Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Try date#() instead of date(). Date() is a formatting function. Date# converts a string into a date. Although as long as your dates match your default date format, I wouldn't think you'd need either function, because the fields should already be dates, I'd think. In any case, I suspect you're having formatting problems. One clue is whether F2 and F3 are left or right justified. If left, they probably didn't get interpreted as dates.
Hey Hi,
Just some little changes:
LOAD * INLINE [
F1, F2
Event1, 01/06/2011
Event2, 07/06/2011
Event3, 18/07/2011
Event4, 05/08/2011
];
"T2":
Load F1, F2, Peek(F2) AS F3
Resident [T1];
Drop Table T1;
Load F1, F2, F3,
Num(Date(F2, 'DD/MM/YYYY'))- Num(Date(F3, 'DD/MM/YYYY')) AS [DaysPassed]
Resident T2;
Drop Table T2;
Hope this helps...
Regards
"T3":