question

Steven J avatar image
0 Likes"
Steven J asked tannerp commented

How do I get schedule source to use converted date?

I am trying to use a schedule source in an excel table where the arrival is a date. Flexsim converts it to a Flexsim model 10 digit date/time format. I set my model start date just prior to first arrival. It will not create anything. If I change the converted Flexsim date to 5, 10, 15 etc, instead of 3155609600.00 (11/20/17) no problem. How do I get flexsim to properly convert and then use a date as the arrival time?

FlexSim 18.1.1
schedule sourcedate conversion
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

Emily Hardy avatar image
0 Likes"
Emily Hardy answered tannerp commented

Hi Steven, sorry for the delay in answering your question.

FlexSim and Excel have a different way of counting dates. The number that represents a date in Excel won't correspond to the same date in FlexSim. However, you can convert the Excel date into the FlexSim date using the "convert" command. This will look like the following (using the time 500 as an example):

convert(500, XL_DATETIME, FS_DATETIME);

You can use the same command to then convert this date into a more readable copy as well:

convert(convert(500, XL_DATETIME, FS_DATETIME)DATETIME_STR);

You can import your table and run this script to convert your dates. However, it does have to be a number, rather than text, as shown:


date-to-num.gif (93.2 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.