BusinessObjects Board

Converting String Data Field to Show Difference In Seconds

I have a report that has a field called [SI Starttime]. This field is a string data type and portrays the data as 20110325012055 which includes the year, month, day, hours, minutes, seconds. I have another field called [SI Endtime) which is also a string data type and portrays the data as 20110325012112 which includes the year, month, day, hours, minutes and seconds .

I’ve been asked to calculate the elapsed time between the two fields in seconds. Initially I thought I could parse the seconds data and calculate the difference between the two but quickly realized that wasn’t going to work. In the example, above the elapsed time in seconds should be 17 seconds but my calculation showed 57 seconds.

I’ve tried playing around with the ToNumber function but can’t quite seem to figure out how to write a variable that would give me the correct result. Any suggestions?


i723451962 (BOB member since 2010-11-11)

Hi,

This older topic can get you started:

Please if it’s not clear.


Marek Chladny :slovakia: (BOB member since 2003-11-27)