Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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)



Former Member replied


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



Sri Harsha

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question