Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 17:19:54 +0000



Post From: best way to convert SCDateTime to db and back

[2021-10-11 17:03:01]
User99735 - Posts: 234
Hi,
Roundtripping of SCDateTimeMS to double and back is not working.
SCDateTimeMS startDateTime = SCDateTimeMS(2021, 10, 7, 1, 1, 1);
double datetime = startDateTime.GetAsDouble();

SCDateTimeMS endDateTime = SCDateTimeMS(datetime);
sc.AddMessageToLog(SCString().Format("datetime %s", sc.DateTimeToString(endDateTime, FLAG_DT_COMPLETE_DATETIME_MS)), false);

is printing gibberish.

Vivek