Skip to main content
Solved

Calculating total second from hh:mm:ss field


Hello - I have several fields in hh:mm:ss format and I want to sum the total number of seconds from all parts all the field.

 

For example:

01: 10: 30

would total 4230 seconds

 

Does anyone know the best way to achieve this?

 

I am brining the data in from an API and have used the JSONFragmenter to tabularise the data.

 

I assume the current data type for the fields is string as that's the default for FME?

Best answer by nielsgerrits

This can be done using an AttributeCreator:

@DateTimeDiff(@Value(time),000000,seconds)

 

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
  • Best Answer
  • November 6, 2023

This can be done using an AttributeCreator:

@DateTimeDiff(@Value(time),000000,seconds)

 


nielsgerrits wrote:

This can be done using an AttributeCreator:

@DateTimeDiff(@Value(time),000000,seconds)

 

Thank you so much! :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings