question

Peter avatar image
0 Likes"
Peter asked Peter commented

How to change time format in Milestone collector to Model.time?

Hi, how do I change the time format to second instead of datetime in a milestone collector? Datetime seems the default and I cannot find where to adjust that setting to Model.time.


FlexSim 23.2.3
datetimemilestone collectormilestone
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Peter, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Peter commented

I think you have to change the stored value in the tree of the collector.

1705662779084.png

The following code should automate this.

string collectorName = "MilestoneCollector1";
treenode columns = Model.find("Tools/StatisticsCollectors/" + collectorName + ">variables/columns");
for(int i = 3; i <= columns.subnodes.length; i++)
{
    columns.subnodes[i].subnodes["valueFormat"].value = 0;
    columns.subnodes[i].subnodes["valueNode"].value = "Model.time";
}

1705662779084.png (8.3 KiB)
· 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.

Peter avatar image Peter commented ·

Thanks a lot! That solved it!

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.