question

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

Is there a way to read this type of military time for arrivals?

Hello, I am trying to read column B(TIME_CREATED_) to as the interarrival time to create objects. This time is recorded in military time format. The format follows 24 hrs hms but without any spaces.

For e.g. 850 stands for 8 mins 50 seconds past 12pm in the night.


Do I need to reformat this outside of flexsim?

Thanks in advance.

1629315762220.png

FlexSim 21.2.0
flexsim 21.2.0arrival schedule
1629315762220.png (26.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

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Niket M commented
  • You can convert it into a string and split the string into minutes and hours. Please look into the methods of string class. https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Basic/string.html
  • You can use a modulus operator “%“ to get an integer rest by division by 100. Then you draw the minutes and divide the number by 100. Then you get the hours of a day. If it is a format like ddhhmm you have to filter the number by modulus operator, integer division and subtraction in an additional iteration.
· 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.

Niket M avatar image Niket M commented ·
Makes sense. So I have to format the string regardless if I do it inside flexsim or outside. Thanks @Joerg Vogel
0 Likes 0 ·

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.