question

Patcharin B2 avatar image
0 Likes"
Patcharin B2 asked Patcharin B2 commented

Convert Time Unit in Statistic Collector

Hello. I want to convert stay time in from second to minute.

1671467930532.png

From picture I crate "Entry Lift Waiting" Table Chart by ZONE in process flow then pin Stay Time of Zone to Dashboard and install Statistic Collector for convert second to minute by /60 in avg. and max. column.

So, If I use /60 the time will be normal number. How can I convert time in normal number to time in time number. Such as from 90 second = 1.50 minute convert to 90 second = 1.30 minute.

Thank You.

FlexSim 22.2.2
timestaytimestatisctis collectorconvert time
1671467930532.png (42.2 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.

Jason Lightfoot avatar image
2 Likes"
Jason Lightfoot answered Patcharin B2 commented

Install the stats collector and the for each of the time fields/columns wrap the expression for the time value (without the divisor) like this:

  1. DateTime(<expression>).toString("%H:%M:%S")

so in the attached example the original expression was:

  1. getstat(data.rowValue, "Staytime", STAT_AVERAGE, instance) / collector.TimeDivisor

while the new column is

  1. DateTime(getstat(data.rowValue, "Staytime", STAT_AVERAGE, instance) ).toString("%H:%M:%S")

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Patcharin B2 commented

Please do it in the display Unit of each Chart in Dashboard. unit-conversion.jpg


unit-conversion.jpg (29.2 KiB)
· 5
5 |100000

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