Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a field that represents a date in the format 20160401
I need to
1. Change the field so that it is recognised as a date
2. Only include the records where the date is greater than today
May be do like this:
LOAD *
Where DateField > Today();
LOAD Date#(DateField, 'YYYYMMDD') as DateField
OtherFields
FROM Source;
Some blogs on how to read date correctly:
And to avoid the preceding load and to filter the records already at the source:
Let vCutOff = Num(Date(Today(),'YYYYMMDD'));
LOAD Date#(DateField, 'YYYYMMDD') as DateField
OtherFields
FROM Source
WHERE DateField > $(vCutOff);