Skip to Content

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 29, 2015 at 09:52 PM

    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

    Add comment
    10|10000 characters needed characters exceeded