3 Replies Latest reply on Apr 9, 2012 6:34 AM by Rajini S

    Not able to get Days difference with two date & time field

    Rajini S

      Hi All,


      I have 2 date & time fields(Launched_date, Published_date) and need to find the date & time difference based on Cust_Item field.

      Date& time field format is as - 2/21/2012 8:04:41


      I am able to get differences properly for hour, minute, seconds and also able to get Days difference if have 2 different dates for Launched & Published dates.

      Ex. Launch Date - 2/2/2012 2:57:58

             Publish Date - 2/8/2012 9:19:04


      I am getting result as ''04 Days 18 Hours 21 Min 6 Sec'' and which is correct. But if I have date&time as same day as below,

      Launch Date - 2/7/2012 8:12:03

      Publish Date - 2/8/2012 8:58:47

      getting result as '30 Day 00 Hour 46 Min 44 Sec' which is not correct for Days difference. It should be as '00 Days'


      I have used date & time format as below in custom format and used ([Published_date]) - ([Launch_Date]) calculation to find the differences.

      dd "Day" HH "Hour" mm "Min" ss "Sec"


      Please help me to find the date & time differences properly.