question

Amey Ramane avatar image
0 Likes"
Amey Ramane asked Amey Ramane commented

How to resolve Error Constructing DateTime ?

DateTimeFromTable_Error.fsmI have attached one model herewith . In the model token is generated line by line as per Global table date and time. I am getting following error

exception: Error Constructing DateTime: Value not valid date string.


Can anyone help to resolve this error

FlexSim 24.2.2
stringdatetime
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

Yumi Nishijima avatar image
1 Like"
Yumi Nishijima answered Amey Ramane commented

Hi @Amey Ramane

The error was because the way you constructed the string TimeDate, this string need to get the date before the time. I made some changes using the class DateTime in your code and if you want to know more about date and time in flexsim you can see the link FlexScript Class - DateTime.

datetimefromtable-error_1.fsm


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

Amey Ramane avatar image Amey Ramane commented ·
Thank you so much @Yumi Nishijima for the correction and extending reference knowledge as well. It is working now.
0 Likes 0 ·