question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Patrick Cloutier commented

Error when in date/time display format in stats collector ?

As you can see from the attached screen shot, when I set the display format to date/time in the stats collector, it keeps telling me that "exception: Invalid convert command: cannot format windows datetime strings before Jan 1, 1970",

It still works but I can't stop that line from appearing in the console.

Any way to prevent this? or is this a bug?

FlexSim 18.1.1
stats collectordatetimedisplay format
isitabug.jpg (127.1 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Patrick Cloutier commented

Based on your screenshot, it's hard to say if it's actually a bug. Here's a common user-story for how those messages appear:

  • You add a time column, but forget to the value or the format of the column, because you're just adding a bunch of columns.
  • You run the model, and notice that there are a bunch of '1' values in the time column
  • Realizing your mistake, you go back to the Statistics Collector and change the value and format of the time column. At this point, you get swamped with system console errors.

In this scenario, you get swamped with console errors because the error happens during the draw. Now that the formatting is set to Date/Time, the table view assumes that the value in that column must be a FlexSim date time (the number of seconds since 1601). If that number represents a date before 1970, it can't be formatted as text. The value 1 represents one second into the year 1601, so you get the errors every time the window draws.

Once you reset and run, however, the errors will stop happening. The system console does not clear itself, so those errors will still be there. I recommend clearing out the system console (you can use ctrl+A to select all, then backspace to delete all) to see if you still get them. If you do, double check all column formats, and make sure the only columns with the Date/Time format have a FlexSim date time (like Model.dateTime) value in them.

If, after you do all of that, you continue to get an error, then go ahead and post a demo model, and we'll get the issue fixed.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Patrick Cloutier avatar image Patrick Cloutier commented ·

Once I closed and restarted Flexsim and reloaded the model the error was gone.

Thanks,

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.