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.
Regards,
Sufian.
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:
https://docs.mendix.com/refguide/parse-and-format-date-function-calls/
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
'evening'
Go Make It