Hi.
I would like to know, what script I use to do greeting, for example:
If in the morning appear: "Good Morning".....
If in the night appear : Good Night.....
.. it continue..
I didn't get found out a script to get the current hour in number (in format 24hs). I think if I found out it, it's easiest, because I can use condition
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
The expression Num2Time(Time(), "A") will return either AM or PM.
Here is the complete code (FormCalc)
if (Num2Time(Time(), "A") == "AM") then
xfa.host.messageBox("Good Morning")
else
xfa.host.messageBox("Good Night")
endif
Nith
Views
Replies
Total Likes
The expression Num2Time(Time(), "A") will return either AM or PM.
Here is the complete code (FormCalc)
if (Num2Time(Time(), "A") == "AM") then
xfa.host.messageBox("Good Morning")
else
xfa.host.messageBox("Good Night")
endif
Nith
Views
Replies
Total Likes
Hi Nith, How are you?
Thanks for you reply, but is almost this.
I would like to want the function that would get the number hours in format Brazil (24). For example, I would like to greet also with a Good Afternoon.
I need just this function (i didn´t found out). I think with that I get to do what I want using condition
Sorry my bad English.
Views
Replies
Total Likes
Try
if (Num2Time(time(), "HH", "pt_BR") < 12) then
xfa.host.messageBox("Morning!")
else
xfa.host.messageBox("Evening!")
endif
Hi.
Exactely this I was looking.
Thanks so much
Views
Replies
Total Likes
Nith.
Thank you too.
I chose the Helpfull answer too!
See you.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies