Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone, I'm applying the data difference in a table using maketime, where the interval time needs to be less than 1 hour. However, it is counting incorrectly.
LOAD NR_CLIENT,
IF(Interval((DT_CHANGE)-(DT_AVAL))<=MakeTime(1,0,0),'S')AS FL_INTERVAL
RESIDENT ATEND_CLIENT_ALL;
Interval() is a formatting function. It doesn't modify the underlying value, which as per my previous post is negative 16.2.
DT_CHANGE - DT_AVAL is negative, ~ -16.2, so it is obviously smaller than MakeTime(1,0,0) which is ~0.42....
Perhaps you'll want to apply fabs() to the first part to avoid the issue of negatives?
The issue is that line shouldn't mark the 'S' because the interval between these two dates is >=1 hour. And I was confused without understanding
Interval() is a formatting function. It doesn't modify the underlying value, which as per my previous post is negative 16.2.