It is very simple task but just in case someone wants to save some time, I'll leave this in here:
(also I donยดt know if anyone has already posted this yet.)
IF(
AND(
NUMBER(TEXT(NOW(),"H"))>=6,
NUMBER(TEXT(NOW(),"H"))<=11
),
"Good morning",
IF(
AND(
NUMBER(TEXT(NOW(),"H"))>=12,
NUMBER(TEXT(NOW(),"H"))<=18
),
"Good afternoon",
"Good evening"
)
)
Keep in mind that this expression will only work with users in the same time zone as the bot or app generating the greeting message.
IFS(
TIMENOW()<"06:00:00",
"Good Night",
TIMENOW()<"12:00:00",
"Good Morning",
TIMENOW()<"18:00:00",
"Good Afternoon",
TIMENOW()<"23:59:59",
"Good Evening"
)