web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Converting time in seconds to dd:hh:mm:ss (Report Builder)

(0) ShareShare
ReportReport
Posted on by 205

Using Report Builder 3.0, I wrote a pretty basic report that was just a little too complex to accomplish with the report wizard in CRM. I'm using the DateDiff function to calculate the time between two dates, in seconds. I want to display this in a new column in dd:hh:mm:ss format. I am able to accomplish hh:mm:ss, but dd:hh:mm:ss doesn't want to work for some reason when I first divide by 86400 and adjust the rest of this formula accordingly.

=int(sum(Fields!Seconds.Value)/3600) & "h: " & int((sum(Fields!Seconds.Value) Mod 3600)/60) & "m: " & (sum(Fields!Seconds.Value) Mod 3600) Mod 60 & "s"


*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    multiply seconds with 0.000011574 to get days  so the formula should be

    int(sum(Fields!Seconds.Value/0.000011574)

  • Verified answer
    ChadF Profile Picture
    205 on at

    Here's the solution I (finally) worked out:

    =int((Fields!Seconds.Value)/86400) & "d: " & int (((Fields!Seconds.Value) Mod 86400)/3600) & "h: " & int(((Fields!Seconds.Value) Mod 3600)/60) & "m: " & ((Fields!Seconds.Value) Mod 3600) Mod 60 & "s"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans