10-26-2022, 12:33 PM
I'm trying to figure out a way to find just the number of days between two dates... here's my logic...
I guess I still don't quite understand how to use the DateTime functions properly... I'm sure Gintaras knows exactly how they work thou. I've scoured over the Help and there's just not enough examples to clear it up for me I suppose. Any help would be appreciated!
str Today = "10/26/2022"
str Target = "12/25/2022"
int DaysUntil = Days(Target) - Days(Today)
out F"There are {DaysUntil} Christmas left"
#sub Days
function str'DateStr
;; Date strings can be either MM/DD/YYYY or MM/DD/YY
int NumDays
;; Calculate the number of days since 1/1/1970
NumDays = ??????(DateStr)
ret NumDays
I guess I still don't quite understand how to use the DateTime functions properly... I'm sure Gintaras knows exactly how they work thou. I've scoured over the Help and there's just not enough examples to clear it up for me I suppose. Any help would be appreciated!