Cancel
Showing results for 
Search instead for 
Did you mean: 

Time Format

Pioneer
Pioneer

Hello,

 

Is it possibe to change TIME format? I mean to remove ".0000" at a table file.

 

For example: 

- "38:42.0000" -> Time that table shows.

- "38:42" -> time I want to show.

 

I tryed to use ".timeformat" at my table but i cant remove the ".0000".

 

Thanks.

2 REPLIES

Re: Time Format

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Arthur,

it seems to be impossible.

I recommend to use a column of type string and copy the time values (Column 1 of my example) to the string values (Column 2):

 var t:time := TableFile[1,j]
t := round(t)
var str:string := to_str(t)
TableFile[2,j] := copy(str,1,strLen(str)-5)

 For instance 3:45.9000 will be "3:46".

Regards,

Peter

Re: Time Format

Pioneer
Pioneer

Thank you Peter,

 

It works. I just wanted to show the result exporting to Excel. This way the excel shows the same format as the plant format whitout any issue.

 

PS: I do not need precision at my report. So it's ok hidding the 5 last elements.

 

 

 

Regards,

 

Arthur