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.

Quick Time Entry Function

Featured Replies

I found a nice custom function in the comments of this CF  That allows a user to quickly enter times.

 

Let(
[
tt =
Int(
Substitute(
Choose( Length( textfield ) - 1; "ç00"; "ç00"; "ç"; "ç" );
"ç";
textfield
)
);
ts = Case( Div( tt - 100; 1200 ); 100 + Mod( tt - 100; 1200 ); tt )
];
Replace( ts; Length( ts ) - 1; 0; ":" ) & " " &
Case(
Position( Lower( textfield ); "p"; 1; 1 );
"P";
Div( tt - 100; 1200 );
"P";
"A"
) & "M"
)
But there are a few bugs:
00 = 12:00pm
10p and up = 12:00pm
 
Plus I would like a tweak:
let "." convert to 'pm'  (for users with extended keyboards)
 
any ideas?

I'll be looking forward to your updated calc!

  • Author

spoken like a true father David.

 

Okay it could be streamlined. But I fixed the 10p–12am entries, default is PM and a '.' (period) equal AM

 

 

Let([

start = Lower ( textfield ) ;
value = Filter ( start ; "1234567890" ) ;

tt =
Int(
Substitute(
Choose( Length( value ) - 1; "ç00"; "ç00"; "ç"; "ç" );
"ç";textfield)  );

ts = Case( 
Div( tt - 100; 1200 ); 100 + Mod( tt - 100; 1200 ); tt ) ;

tc = Replace( ts; Length( ts ) - 1; 0; ":" ) ;
dv = Abs (Div( tt - 100; 1200 )-1)
];


tc & " " &
Case(
Position( start; "a"; 1; 1 ) or Position( start; "."; 1; 1 ) ; "A";
dv =1; "P";dv =2; "A"; dv =0; "A"; 
"P" ) & 
"M"

)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.