|
|
|||||||
Hi, Is it quite easy in a script to check if the current date is one month greater than a date variable set in the script? Are there any easy solutions to that before i reinvent the wheel? Thanks |
||||||||
|
|
|||||||
It's okay i've done it now with the following:
Probably not very elegant but it seems to work. |
||||||||
|
|
|||||||
TimeDiff() can do this easily: Code: If TimeDiff($DateVar, 'now', 'd') > 30 "File is more than 30 days old!" ? EndIf TimeConvert converts dates to cTime values (number of seconds since a date) while TimeDiff returns the number of (milli)seconds between to timestamps. It can also accept a Format parameter to return the difference in minutes, hours, days, or years (including fractional parts). Glenn |
||||||||
|
|
|||||||
There aren't any files involved.... also, take the quotes out of my top two variables in my script as i've just realised i made them into strings rather than numerics... |