Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
if have a problem with a calculation in my LOAD script.
I have the following situation:
when the date is not equal to 01-01-1900 then i want the difference between a date field(Acceptationdate) - datetime field (registeredDate)
So i have the following line in my script:
IF (ACCEPTATIONDATE <> MakeDate(1900,1,1), NUM(ACCEPTATIONDATE - DATE(SEEKERRESPONSEDATETIME)),0 )AS DAYSREGISTERED;
But when i look into my table (preview) and see what is in the column DAYSREGISTERED i not see whole days... for example 140 days. but i see for example 140,68972222
Anybody an idea?
To see whole days (i.e. to change 140,68972222 to 140), you can use the floor function:
IF (ACCEPTATIONDATE <> MakeDate(1900,1,1), FLOOR(NUM(ACCEPTATIONDATE - DATE(SEEKERRESPONSEDATETIME))),0 )AS DAYSREGISTERED;
To see whole days (i.e. to change 140,68972222 to 140), you can use the floor function:
IF (ACCEPTATIONDATE <> MakeDate(1900,1,1), FLOOR(NUM(ACCEPTATIONDATE - DATE(SEEKERRESPONSEDATETIME))),0 )AS DAYSREGISTERED;