Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Need help to for QV to help calculate the difference between two dates.
Currently i'm using "date(floor([Due Date]-[Closed Date]),'DD/MM/YYYY') as DeltaDueClosed"
Issues that I'm facing,
1. My original data have timestamp behind, which I do not want it to calculate with the timestamp
2. Example Due Date = 13/10/20, Closed Date = 13/10/20.
The data outcome was -1, should be 0 instead..
Any idea how to get the correct data?
@Novelchew You an individually floor it and then take a difference, of course I am assuming that your both Date fields are in proper Date or timestamp format.
floor([Due Date])-floor([Closed Date]) as DeltaDueClosed"
@Novelchew like ?
floor(timestamp#([Due Date],'DD/MM/YYYY hh:mm:ss'))-floor(timestamp#([Closed Date],'DD/MM/YYYY hh:mm:ss')) as DeltaDueClosed
hello!
Tried it and the data all became "-" 😞
@Novelchew can you share a sample data ?
@Novelchew You an individually floor it and then take a difference, of course I am assuming that your both Date fields are in proper Date or timestamp format.
floor([Due Date])-floor([Closed Date]) as DeltaDueClosed"
you can try this aswell
date(timestamp#(date2,'MM/DD/YY'),'DD/MM/YYYY') as Dt2,
date(timestamp#(date1,'MM/DD/YY'),'DD/MM/YYYY') as Dt1,
Interval( (date(timestamp#(date2,'MM/DD/YY'),'DD/MM/YYYY')) - (date(timestamp# (date1,'MM/DD/YY'),'DD/MM/YYYY')), 'd') as DTDiff
or
Just use interval function as
Interval(Date1-Date2,'d')
or
@Novelchew if one of the last two posts helped you resolve your issue, we would greatly appreciate you returning to the thread and closing it out by using the Accept as Solution button on the post(s) that helped. If you did something different, you may post that and then use the button to mark it as the solution. The posters receive credit for the help they provide by the Likes and Solutions they get marked on the Community, so it helps if you properly close things to be sure they get recognition for the assistance, and it helps others know what actually worked.k
Regards,
Brett
Sorry for the late reply.
Thank you.. this worked and help!