How to set a variable to a predefined date/time tomorrow?

Post your questions and help other users.

Moderator: Martin

Post Reply
fractals
Posts: 11
Joined: 12 Mar 2013 15:27

How to set a variable to a predefined date/time tomorrow?

Post by fractals » 17 Oct 2019 11:44

Hello,

I'd like to set a variable "test" to 7AM on the following day. The "following day" part is relative to today's date (+1) but the time (7:00 AM) should be fixed. The output should be in UNIX time (i.e. the default Automagic way).

Example:

If now is 17 Oct 13:40, "test" should be set to 18 Oct 07:00 AM.

How can I do that?

Thanks!

fractals
Posts: 11
Joined: 12 Mar 2013 15:27

Re: How to set a variable to a predefined date/time tomorrow?

Post by fractals » 17 Oct 2019 13:00

OK, I've found a way. To answer my own question --

Code: Select all

var = addDays(triggertime, 1);
var1 = getDate(var, 7, 0, 0);
var1 = Tomorrow at 7:00 AM :)

Thanks.

Post Reply