datetime arithmatics

To add comments, please log in or register
samjesse
645
samjesse  

Hi

How can I get the server datetime for n days ago at 1am?

Thanks

Audrius Stravinskas
230
Audrius Stravinskas  
samjesse:

Hi

How can I get the server datetime for n days ago at 1am?

Thanks

now=TimeCurrent();

TimeNdaysAgoAt1AM=now - ((TimeHour(now)*60+TimeMinute(now))*60+TimeSeconds(now)) + 1*60*60 - n*24*60*60;

To add comments, please log in or register