Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

Hi all.

 

I have a field called Start Time. Typically users enter something like "6pm" which I have the layout object set to display the format as "6:00 PM". The issue is—the data is still stored as "6pm" so when it shows up on layouts in <<Start Time>> it shows as how its stored and not formatted nicely. 

I am trying to replace the "6pm" input with the desired format of "6:00 PM" in the stored field but I am having trouble. I have tried the Auto Enter Calculated Value with GetAsTime ( Start Time ) and it didnt work. I also created a script and script trigger, onObjectExit to Set Field [ Event::Start Time; GetAsTime ( Event::Start Time ) ] but it is not working. I have also tried Set Field [ Event::Start Time; Time ( GetAsTime ( Event::Start Time ) )] but this throws a too few parameters error. 

Any suggestions or help would be greatly appreciated. Thank you.

 

Rich

Interesting question. I think you have found a bug in the system.

Fortunately there is an easy way to solve the problem you stated:

1 hour ago, RichGags said:

when it shows up on layouts in <<Start Time>> it shows as how its stored

Merged fields can be formatted the same way as actual field layout objects. Just select the text object containing the merged field and apply the appropriate time data formatting to it (this will of course extend to all time fields merged in the same text object).
 

BTW, if you do want to normalize user entry at its source, you could auto-enter:

Time ( Hour ( Self ) ; Minute ( Self ) ; Seconds ( Self ) )

But if I am not mistaken that will result in AM/PM times being converted to 24-hour format, which may not suit you.

 

Added:

10 minutes ago, comment said:

that will result in AM/PM times being converted to 24-hour format

But this could work:

Let ( 
h = Hour ( Self )
;
Time ( Mod ( h - 1 ; 12 ) + 1 ; Minute ( Self ) ; Seconds ( Self ) ) 
& 
If ( h > 11 ; "PM" ; "AM" )
)

 

Edited by comment

  • Author
  • Newbies

Thank you!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.