Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Experts,
I have a requirement to find the difference between two dates in Hours,Days, Months and years.
Fop example : order_date 10/01/2012 , Ship_Date 10/12/2012. What i would like to do is Ship_Date - order_date = 12 days
Is there any way I could do this in expresion?
thanks in advance,
Aji Paul.
Hi
Try like this
=Interval(ShipDate-OrderDate,'d hhmm:ss') for day difference
For Year:
=Year(ShipDate) - Year(OrderDate)
Hope it helps
Hai Aji,
Use this Code It's Work Fine
Floor(Interval(order_date-Ship_Date,'DD')) -> For Days
Floor(Interval(order_date-Ship_Date,'D HH:MM:SS'))->For Days With TimeStamp
Like this
=Interval(Date(ShipDate,'DD/MM/YYYY hh:mm:ss')-Date(OrderDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY hh:mm:ss')
Ex: These are your
order_date 10/01/2012 and
Ship_Date 10/12/2012
Result as per the given expression : 11/00/0000 00:00:00