Convert Time Unit in Statistic Collector

Convert Time Unit in Statistic Collector

patcharin_b2
Not applicable
34 Views
8 Replies
Message 1 of 9

Convert Time Unit in Statistic Collector

patcharin_b2
Not applicable

[ FlexSim 22.2.2 ]

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.

0 Likes
Accepted solutions (1)
35 Views
8 Replies
Replies (8)
Message 2 of 9

joerg_vogel_HsH
Mentor
Mentor

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

0 Likes
Message 3 of 9

patcharin_b2
Not applicable

1671470395723.png

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.

1671470705991.png

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
Message 4 of 9

Jeanette_Fullmer
Community Manager
Community Manager

Hello @Patcharin B2,

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

1671492834709.png

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.

1671492879935.png


0 Likes
Message 5 of 9

patcharin_b2
Not applicable


1671498866136.png

1671498957173.png

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
Message 6 of 9

Jeanette_Fullmer
Community Manager
Community Manager
How does .93 minute convert to 1.63 minutes? .93 minute is 55.8 seconds. So if it is .93 minute do you want it to display 0.55?
0 Likes
Message 7 of 9

patcharin_b2
Not applicable
Yes that right. I want to display 0.93 minute to 0.55 minute.
0 Likes
Message 8 of 9

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

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

Message 9 of 9

patcharin_b2
Not applicable
OK I can do this. Thank You Somuch.
0 Likes