February 12, 20196 yr 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 "
February 12, 20196 yr 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 February 12, 20196 yr by comment
February 12, 20196 yr Let ( [ from = GetAsTimestamp ( DateOfClass & " " & StartTime ) ; to = GetAsTimeStamp ( DateOfClass & " " & EndTime ) ]; DateOfClass & " " & GetAsTime ( from ) & "-" & GetAsTime( to ) )
February 18, 20196 yr Author 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.
Create an account or sign in to comment