Skip 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.

Determining the afternoon, evening or morning

Featured Replies

Hi all

I would like to create a script to calculate the time of day in order to display a "good morning," "good evening," "good afternoon" message. Has anyone seen a similar script out there?

You could do a calculation, I believe, unstored:

Case

(

Get(CurrentTime) >= "0:01" and Get(CurrentTime) <= "12:00" ; "Good Morning";

Get(CurrentTime) >= "12:01" and Get(CurrentTime) <= "5:00" ; "Good Afternoon";

Get(CurrentTime) >= "5:01" and Get(CurrentTime) <= "11:59" ; "Good Afternoon";

)

I think that should do it :

There are various methods you could use, and I don't know if you want to display a dialog or use a field or what, but here's one way of setting up the calc:

Let( [

noon = Time ( 12 ; 0 ; 0 ) ;

cocktail = Time ( 6 ; 0 ; 0 ) ;

now = Get ( CurrentTime ) ] ;

Case(

now < noon ; "good morning" ;

now < cocktail ; "good afternoon" ;

"good evening" ) )

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.