I am trying to set my ‘Email Time’ value to ‘08 AM’ if the time is between ‘05 PM’ and ‘07 AM’. And if the time is between ‘08 AM’ and ‘04 PM’ just set the ‘Email Time’ value to the current hour plus 1 hour.
Here is what I have currently set up
The email type gets set to ‘08 AM’ no matter what the hour is, I am unsure why this occurs.
As for increasing the hour by 1, I have not found any way of doing this so any help would be appreciated.
This is something very tricky and I believe it might become even more complex if you attempt to apply the formula. My suggestion is to employ a Data store, with time as the key value, for this purpose.
@Msquare_Automation A data store is an overkill for a simple operation like this and is terrible advice. Are you simply replying just so you can spam your links? I noticed that you have been doing that in every post you made. According to the community guidelines “promotional efforts is forbidden”, and in the Ultimate Topic, “avoid spamming every conversation with self-promotional comments”
Hello @BrendanJ, welcome to the Make community! This is actually quite simple, you just need to use the date formats in a way where you can perform math on them!
Let’s break this down into steps
Get the current hour, from 0-23 (see date formats)
formatDate(now; H)
You want to do something if hour of day is 8 to 16 inclusive, and something else otherwise:
Sorry to bother you again, but I would also like to do similar with my ‘day’ variable.
I have made it so it sets the day to ‘Monday’ if it is Saturday or Sunday. And sets it to the current day if it is not. However, if the Email Time is set to 08 AM, I want it to set the day to the next day. And if it is Friday, Saturday or Sunday set the day to Monday.