|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 1 of 1 total|
|EncodeDate(y,m,d) -> use EncodeDateTime(y,m,d,0,0,0,0)|
|Sat, Nov 9 2013 9:05 AM||Permanent Link|
Tactical Business Corporation
In case anyone else bumps into this, maybe it will save you time...
dt : DateTime;
dt := EncodeDate(2013,11,9);
I thought the time part would be 0:00.00.000 but it takes the current time as at the EncodeDate moment and add's it to your date.....
I've recommend to Tim that he change the EncodeDate routine to be
function encodedate($0, $1, $2, $3)
return new Date(Date.UTC($0, $1 - 1, $2, 0, 0, 0, 0)).getTime();
return new Date($0, $1 - 1, $2, 0, 0, 0, 0).getTime();
but it is easy just to never use EncodeDate but use EncodeDateTime to fix this problem:
dt := EncodeDateTime(2013,11,9,0,0,0,0);
Don't forget there is still a bug in EncodeDateTime 1.02 B2 - that is fixed for next build... if you use UTC
dt := EncodeDateTime(2013,11,9,0,0,0,0, True);
Work around is subtracting one from you month until the next build....ust for UTC).
dt := EncodeDateTime(2013,11 - 1,9,0,0,0,0, True);
This web page was last updated on
Friday, March 17, 2023 at 10:08 PM
© 2023 Elevate Software, Inc. All Rights Reserved
Questions or comments ? E-mail us at email@example.com