Hi everyone!
I have just purchased Automagic and this is my first post here.
I'm trying to find a way to use getDate() (or any other function) to find the date 5 days ago.
Any help would certainly be appreciated!
Thanks.
Finding the date 5 days ago
Moderator: Martin
Re: Finding the date 5 days ago
Hi
A date in Automagic is stored as the number of milliseconds since 1970. You can use regular +/- operations to modify a date or use the addDays function:
d = addDays(getDate(), -5);
or
d = getDate() - 5*24*60*60*1000;
Regards,
Martin
A date in Automagic is stored as the number of milliseconds since 1970. You can use regular +/- operations to modify a date or use the addDays function:
d = addDays(getDate(), -5);
or
d = getDate() - 5*24*60*60*1000;
Regards,
Martin
Re: Finding the date 5 days ago
Hi Martin,
This is exactly what I needed. Thanks so much for your help.
Steve
This is exactly what I needed. Thanks so much for your help.
Steve