Write Good Morning when the user enter its account.

Good Afternoon all, I try to make an application for a company , for the user who enter its account i want it to write “good morning if it is before than 12:00 or between12:00 to 18:00 good afternoon”  “ or today is Thursday’ Can someone give me an idea how to do that?
2 answers

Hi Selcuk,


You can format your current Datetime to get the output as the current hour ‘String’ you can convert it to integer to compare if needed.

Example Create a string variable having the value as formatDateTime([%CurrentDateTime%],'k') the output will be the hour.

Please refer to the documentation as well , hope this helps.






Hi Selcuk,


You can create the variables in a Microflow evaluating the DateTime. As an example the variable below will contain the value Mon, Tue, etcetera


You can use :

formatDateTime([%CurrentDateTime%], 'u')  for the full name of the day. 

See the documentation:


So, formatDateTime([%CurrentDateTime%], 'H') would get the string value of the hour. In order to make it to ‘morning” etcetera you can use:
if parseInteger(formatDateTime([%CurrentDateTime%], 'H')) < 12 then 'morning' else
if parseInteger(formatDateTime([%CurrentDateTime%], 'H')) < 18 then 'afternoon' else


Go Make It