Converting date to hour
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
SriHarsha T replied
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