Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there any function in QV like SQL function:datediff(day, startdate , enddate) ?
Thanks.
Interval() ?
Like: Interval(startdate-enddate, 'DD') // or changing the order of dates
Hi Isaac,
Try to use Interval(EndDate-StartDate,'D') or simply use EndDate-StartDate to get day different.
Regards,
Sokkorn
You can also sort it asc in a straight table and do an Above expression.
Example:
(Date)-(Above(Date))
Thanks
Stefan
1. date((date(Field1,'MM/DD/YYY')-date(Field2,'MM/DD/YYYY')),'DD')
2. Interval(Field1-Field2,'dd')
3.date(timestamp#(Field1,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY') as Date2,
date(timestamp#(Field1,'MM/DD/YYYY hh:mm:ss'),'DD/MM/YYYY') as Date1,
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
Use this thread
regards