
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Difference between two dates
Hi,
I having trouble in getting difference between two dates which is timestamp. I want the difference in "Days" and create a chart.
Example:-
Field 1 :- 4/11/2013 12:40:32
Field 2 :- 4/16/2013 12:00:00
The value should be "5 days"
- Tags:
- differentiate_dates
- « Previous Replies
-
- 1
- 2
- Next Replies »


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
date((date(Field1,'MM/DD/YYY')-date(Field2,'MM/DD/YYYY')),'DD')
HTH
Sushil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI ,
Try the below code
fabs(Date(Field1,'DD/MM/YYYY')) - fabs(Date(Field2,'DD/MM/YYYY'))
//Yusuf

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this in script
date(timestamp#(date2,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY') as Dt2,
date(timestamp#(date1,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY') as Dt1,
Interval( (date(timestamp#(date2,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY')) - (date(timestamp# (date1,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY')), 'd') as DTDiff
Also find the attachment.
Regards,
Nirav Bhimani


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just use interval function as
Interval(Date1-Date2,'d')
Thanks

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try like this
=Ceil(Interval(Date#('4/16/2013 12:00:00', 'MM/DD/YYYY hh:mm:ss') - Date#('4/11/2013 12:40:32', 'MM/DD/YYYY hh:mm:ss'), 'DD' ))
Hope this helps you.
Regards,
Jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Saaru,
i have some douts on you requrement you want to display days only or time also.
what is the result for your test data.
Regards
SHAIK

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Saaru,
i have some douts on you requrement you want to display days only or time also.
what is the result for your test data.
Regards
SHAIK


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
Make sure that your format of date in both field must be same
Date(Date#(Field2,'MM/DD/YYYY hh:mm:ss')-Date#(Field1,'MM/DD/YYYY hh:mm:ss'),'DD') as RestDays
or you can use interval also
Interval(Field2 -Field1,'DD')as Newdays

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jagan!!
It works when i apply your formula but when I replace with actual field then it is not working like below
=Ceil(Interval(Date#([Field2], 'MM/DD/YYYY hh:mm:ss')-Date#([Field1], 'MM/DD/YYYY hh:mm:ss') , 'DD'))
Am i missing something?

- « Previous Replies
-
- 1
- 2
- Next Replies »