question

Paul M4 avatar image
0 Likes"
Paul M4 asked Phil BoBo answered

Import information into table as date

Hello, I'm trying to import a csv file with date information. It looks like I cannot assign a data format 'date' to a column. Is this correct?

If I select 'number' as column format, I should be able to import a date as number of seconds since January 1st 1601. Yet all I see is 1's instead of the numerical representation of the dates. (Import button does the importing work.)

Can anyone help me with this?

Regards,

Paul

datacrunching-2.fsm

test.xlsx

FlexSim 19.2.4
datetimeimport datacolumn formatdata formats
datacrunching-2.fsm (26.1 KiB)
test.xlsx (9.8 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

·
Phil BoBo avatar image
2 Likes"
Phil BoBo answered

The model you attached doesn't have a configured Excel Import in it, so I can't tell you why "all you see is 1's", but if you configure an Excel Import, then it can load these dates into FlexSim just fine.

If you use the Automatic Data Distinction, then those cells come in as strings:

If you use the Values Only (very fast) Data Distinction, then those cells come in as Excel Time values, which you can convert with DateTime.fromExcelTime():


automatic.png (138.4 KiB)
fromexceltime.png (160.7 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.

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.