Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to get the number of days between today and different dates.
I use the following expression:
=INTERVAL(DATE(TODAY())-DATE_TIME_TRANSACTION,'DD')
(The field DATE_TIME_TRANSACTION has this format: DD/MM/YYYY hh:mm:ss)
The problem is that when I have transactions from today, it returns me the value -1.
Do you know how could I solve this?
Thank you!
INTERVAl takes only one parameter and compares against system's date.
Difference between dates:
Today() - [other date]
Example: Today()-Date('5/1/2018')
May be this
=Today() - Floor(DATE_TIME_TRANSACTION)
Try floor as suggested by Sunny , it will work. Floor will omit your time part
Today() - floor(DATE_TIME_TRANSACTION)
Hi
try this
SET TimestampFormat='DD/MM/YYYY hh:mm:ss';
LOAD * ,
Interval(Today()-date,'dd' )as count
INLINE [
date
01/05/2018 08:40:45
02/05/2018 08:40:45
];
FLOOR(NUM(now()-date)) as Count