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

I'm completely baffled with this time format problem.

What I need is a time field, 24 hr, hhmm, in which I can enter four consecutive numbers and have the format show as HH:MM. For example, if I enter 0900, it will show as 9:00.

I used a calc in FM9 that worked great, but in FM10 I get a different result. 0900 gives me 90:00?:o I have looked and looked for some interference with the calc and I'm stumped.

The field is set to AutoEnter a calculated value, validated with a timestamp to only allow five minutes to change the input.

Here is the calc:

Let(tt = GetAsText(Self);

Case(

Length( tt ) < 5;

Choose(

Length( tt ); "";

Time( 0; Int( tt ); 0 );

Time( 0; Int( tt ); 0 );

Time( Int( Left( tt; 1 ) ); Int( Right( tt; 2 ) ); 0 )

Time( Int( Left( tt; 2 ) ); Int( Right( tt; 2 ) ); 0 ));

Time(

Int( Left( tt; 2 ) );

Int( Left( Middle( tt; 3; 2 ) & 0; 2 ) );

0 )))

The field is 'Time' and the calc result must be 'Time".

Here is the validation calc:

Int(Get ( CurrentTimeStamp )-CreationStampTimeIn) ≤ 300

Calc result must be boolean.

The time format dialog is set correctly, exactly as in FM9. If fact everything is just the same,but the result differs.

Thanks in advance for your kind help.

John

John read Comments reservation in the end of this post:

http://fmforums.com/forum/showpost.php?post/297541/

I don't think "0700" is a valid entry into a time field. Anyway, the field has an auto-entered calculation that allows time to be entered as "6.08" and interpreted as "6:08". IIRC, it does some rounding too (it's an old file I adapted for this). If you play with it, you can adapt it to your desired format of entry.

...I'm similar surprised to learn that it might have worked at some point? Are all the people you hire ex military, or is it occuring with a certain user? The entire approach might be better served via two textfields instead?

--sd

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.