Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Have a form for creating classes. In it have four fields.

name of class (formatted as text)

date of class (field formatted as Date)

start time of class (formatted as Time)

end time of class (formatted as Time)

How do I concatenate so that they can show up on a form as "1/1/2019 1:00pm-2:00pm". I was able to use GetAsText function on the date and time fields so I could get concatenation but now they read "1/1/2019 13:00pm-14:00pm "

 

Posted (edited)

If this is for display only, you can merge all 3 fields in a single text block and format them the same way you would format date and time fields placed directly onto the layout.

If you want a calculated result (result type is Text), try =

ClassDate
& " " &
Mod ( Hour ( StartTime ) - 1 ; 12 ) + 1 
& SerialIncrement ( ":00" ; Minute ( StartTime ) ) 
& If ( StartTime < 43200 ; "am" ; "pm" ) 
& "-" &
Mod ( Hour ( EndTime ) - 1 ; 12 ) + 1 
& SerialIncrement ( ":00" ; Minute ( EndTime ) ) 
& If ( EndTime < 43200 ; "am" ; "pm" ) 

 

 

Edited by comment
  • Like 2
Posted

Let ( [ 

from = GetAsTimestamp ( DateOfClass & " " & StartTime )  ; 
to = GetAsTimeStamp ( DateOfClass & " " & EndTime ) 

]; 

DateOfClass & " " & GetAsTime ( from ) & "-" & GetAsTime( to ) 

)

  • Like 1
Posted

Thank you both for your help! I had not used either of these functions before. The great thing about sharing a solution is looking up the function and realizing you can use it elsewhere.

This topic is 2116 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.