# question

0 Likes"

## Convert Time Unit in Statistic Collector

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

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
1671467930532.png (42.2 KiB)

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

·
2 Likes"

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:

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

so in the attached example the original expression was:

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

while the new column is

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

StatsCollectorTimeFormatting.fsm

· 1

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

·
OK I can do this. Thank You Somuch.
0 Likes 0 ·
0 Likes"

Please do it in the display Unit of each Chart in Dashboard.

unit-conversion.jpg (29.2 KiB)
· 5

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

·

This Table Chart is come from ZONE in process flow. It are not Time Unit field. So I has create Statistic Collector by install from advance of this chart.

And although stay time chart will has Time Unit field, when select unit to minute it will be normal number (0-99).

How can I convert time unit to time number (0-59). Such as 1.50 minute convert to 1.30 minute.

0 Likes 0 ·
1671470395723.png (29.3 KiB)
1671470705991.png (80.9 KiB)
Patcharin B2 ·

Hello @Patcharin B2,

You can add a label to the statistics collector that is for the conversion.

Then for each of the statistics apply the conversion. So I wanted to convert from the model units of seconds to minutes so I used 60 for the conversion and then divided by the conversion.

0 Likes 0 ·
1671492834709.png (12.8 KiB)
1671492879935.png (26.0 KiB)
Jeanette F ♦ ·

Thank You for reply. This way to solve this is at like before, that I use divided by 60 directly at Value. Yes, a time are convert from second to minute but it will be in Red Circle it be 0.93 minute. From this case in this picture. Example in this case how can I convert from 0.93 to 1.63 minute.

0 Likes 0 ·
1671498866136.png (41.9 KiB)
1671498957173.png (17.7 KiB)