question

Nicholas M avatar image
0 Likes"
Nicholas M asked Nicholas M commented

Help with importing correct date and time from excel

Relatively new to FlexSim. I'm trying to run my simulation based off an imported schedule from Excel. I originally converted the start date/time to a number (IE 8/10/2021 7:49:48 PM became 44418.81) just so I could get the rest of the model logic to function. However, this logic did not accurately depict the actual time I needed the FlowItems to arrive. Now, I want to get the arrivals to actually show up on time but am having some trouble converting between Excel's values for DateTime and FlexSim's values.

The way I have it now, FlexSim just ignores the start time and causes all 634 arrivals to occur simultaneously. I was wondering if I'm just having a brain-fart as to which code to run / the correct way to convert to FlexTime or if using a Global Table to import this data would be the best option. Any help would be greatly appreciated!1629730485094.png

Import Data: Filtered Flexsim Data2.xlsx

FlexSim Model: ScheduledTime.fsm

FlexSim 21.1.5
FlexSim 21.2.0
excel importflexsim 21.2.0arrival scheduledatetime
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

Eric M avatar image
2 Likes"
Eric M answered Nicholas M commented

Hi @Nicholas McGrath, Flexsim has a DateTime class which can be used in converting times from Excel. You can either import the excel time as a number and use the fromExcelTime command or you can use the date string and use the DateTime constructor. The number that's returned in these commands is the number of seconds since Jan 1, 1601. I did this in your model using the script and GlobalTable1. The 2nd column can be copied into the arrivals source. Let me know if you have any questions!

scheduledtime-em.fsm


· 3
5 |100000

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