cancel
Showing results for 
Search instead for 
Did you mean: 

Converting date to hour

Former Member
0 Kudos

The formula listed below is giving me an error. Should I start the formula with an "IF"?

=([Derivatives Processed per Hour by Workflow].[Completion Full Date])-([Derivatives Processed per Hour by Workflow].[Digitization Completion Date]*24)

Thanks,

Roger

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Roger,

You can calculate the difference between dates in seconds and convert it to hours.

Formula for seconds calculation

=DaysBetween([Completion Full Date] ;[Digitization Completion Date]) * 86400

+

(

ToNumber(FormatDate([Digitization Completion Date] ;"HH")) * 3600 +

ToNumber(Left(FormatDate([Digitization Completion Date] ;"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Digitization Completion Date] ;"ss"))

)

-

(

ToNumber(FormatDate([Completion Full Date] ;"HH")) * 3600 +

ToNumber(Left(FormatDate([Completion Full Date];"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Completion Full Date] ;"ss"))

Then convert the value to hours using the formula

Floor(seconds/3600)

Regards

Sri Harsha

Former Member
0 Kudos

Thank you very much! the formula worked like a champ. I really appreciate it.

Former Member
0 Kudos

Roger, Glad it worked.

Can you close the thread as the issue is resolved

Regards

Sri Harsha

Former Member
0 Kudos

how do I close the thread?

Former Member
0 Kudos

I meant to mark the thread as answered

Answers (0)