Duration field type

Questions and Answers asked by users to users, about how others use Jet Reports.

For additional "how to" information, please visit our online Knowledge Base https://jetsupport.jetreports.com/hc/en ... ofessional
Forum rules
The Jet Reports Community forums are not a guaranteed support medium. Official support for Jet Reports is available only through the support desk at http://support.jetreports.com. Staff responses to posts on the forum are not guaranteed.
Colleyv12
Posts: 19
Joined: Tue May 26, 2015 8:13 am

Duration field type

Postby Colleyv12 » Tue Apr 11, 2017 7:13 am

I have a field in Navision, type = Duration, so it presents 1 day 3 hour 15 minutes

It should be a bigint type in the database containing the value in milliseconds, but I cannot get it to come through as a decimal I can add up

Anyone come across this before

Regards

User avatar
HPDeskJet
Jet Reports Certified Professional
Posts: 441
Joined: Wed May 26, 2010 3:40 pm

Re: Duration field type

Postby HPDeskJet » Tue Apr 11, 2017 2:51 pm

In my sample database, fields of type Duration (not to be confused with fields *named* Duration) are presented in the format: n.nn:nn:nn

for example:
duration.png
duration.png (11.39 KiB) Viewed 212 times

If I wanted to add up those, I would need to use a formula to convert them.

When you query your field, how is it formatted? (is this a standard NAV table & field?)
-HP
_______________________
Jet 2015 Certified Trainer

Colleyv12
Posts: 19
Joined: Tue May 26, 2015 8:13 am

Re: Duration field type

Postby Colleyv12 » Mon May 15, 2017 8:59 am

Sorry for the late reply

I have tried it in 2 database,
In 2009 r2 it shows 1 day 13 hours 34 minutes
In 2016 it shows 1.13:34:00

I cannot change the 2009 R2 to show it in excel date time format
2009 database.png

User avatar
HPDeskJet
Jet Reports Certified Professional
Posts: 441
Joined: Wed May 26, 2010 3:40 pm

Re: Duration field type

Postby HPDeskJet » Tue May 16, 2017 8:11 am

Thanks for the additional information (about working with 2009R2).

I elected to use string manipulation to get the values I wanted.

Attached is an example working the the duration field "Idle Time" (in the Session table)

I hope it helps.
Attachments
duration test.xlsx
(17.12 KiB) Downloaded 9 times
-HP
_______________________
Jet 2015 Certified Trainer

Colleyv12
Posts: 19
Joined: Tue May 26, 2015 8:13 am

Re: Duration field type

Postby Colleyv12 » Wed May 17, 2017 1:41 am

Thanks for your time, I understand you can use string manipulation ,but the data in the SQL database is in milliseconds, so is presented as 864000, not 12 hours 13 minutes etc

I have gone back to Jet to ask if we can override the caption reporting to use the raw data which would make it a lot easier on the end user for the reports

Regards


Return to “How do I?”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest