Jump to content

Determining the afternoon, evening or morning


This topic is 5660 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 :

Link to comment
Share on other sites

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" ) )

Link to comment
Share on other sites

This topic is 5660 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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