Skip to Content
avatar image
Former Member

Subtract dates with timestamp in Webi report

I have two dates i.e., User_IN_Date and User_OUT_Date with timestamp in webi report. I need to subtract the two dates and show result in minutes.

Suppose I have dates as -

User_IN_Date - 12/03/2017 03:53:23 and

User_OUT_Date - 14/03/2017 07:36:89

Could anyone please help me in calculating difference between the dates ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 24, 2017 at 10:22 AM

    try this.

    Calculating difference between two date/time fields

    =((((ToNumber(SubStr(FormatDate([Date2] ,"HH:MM:SS") ,1 ,2))*60*60) +
    (ToNumber(SubStr(FormatDate([Date2] ,"HH:MM:SS"), 4, 2))* 60) +

    ToNumber(SubStr(FormatDate([Date2] ,"HH:MM:SS"), 7, 2))) - ((ToNumber(SubStr(FormatDate([Date1] ,"HH:MM:SS") ,1 ,2))*60*60) +

    (ToNumber(SubStr(FormatDate([Date1] ,"HH:MM:SS"), 4, 2))* 60) +

    ToNumber(SubStr(FormatDate([Date1] ,"HH:MM:SS"), 7, 2)))) / 3600) + (DaysBetween([Date1];[Date2])*24)

    You will get difference in seconds.After that you can convert seconds in mintues.

    Add comment
    10|10000 characters needed characters exceeded