Normally when I construct a DateTime, I use something like the following.
string dateString = "1/01/1970"; double dateNum = convert(dateString, DATE_STR, FS_DATETIME); DateTime dateObject = DateTime(dateNum);
However, when I do this with a date prior to 1/01/1970, I get the following exception.
exception: Invalid convert command: _mkgmtime64 failure
Then if my subsequent code tries to use the DateTime object, FlexSim immediately crashes.
According to the command help description of convert, FS_DATETIME is "the number of seconds since Jan 1, 1601", so I should be able to use any date from 1601 onward. Yet the command seems to be bounded by the (very inconvenient) Unix time limit of 1/01/1970. The DateTime object itself supports dates before 1970 (I've been able to produce them by subtracting from a date), but convert doesn't appear to.
How can I easily create a DateTime object for dates prior to 1970?