question

Sunil B2 avatar image
0 Likes"
Sunil B2 asked Sunil B2 answered

SQL date/time import issue

When importing date/time data into global table from sql db , the data/time fraction is off by 420 years in fractions . Below picture shows the date, its value in excel and imported value via DB connection


1629292672737.png


see the attach model with copy paste and import. into global tables

FlexSim 21.1.5
flexsim 21.1.5connectivity
· 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.

Ryan Clark avatar image
0 Likes"
Ryan Clark answered Ryan Clark commented

Hello @Sunil B2,

It actually turns out that your SQL imported value corresponds to 420 years, 228 days, 8 hours, 29 minutes, and 50.237 seconds. This is the amount of time that has elapsed since January 1, 1601 12:00:00 AM, which is the earliest time/date currently allowed by FlexSim. My guess would be that FlexSim produces the time/date format by adding the EventTime in seconds to that initial value or something along those lines.

Does this address your question?

· 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.

Sunil B2 avatar image
0 Likes"
Sunil B2 answered

It seems to be a bug in Flexsim .. When I import into excel from MSSQL the date/time come correctly without any offset.

5 |100000

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