Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the following bit in my data load editor:
LOAD *, Date("Hiring Date" + IterNo() - 1) as ActiveDate, MonthName("Hiring Date" + IterNo() - 1) as ActiveMonthYear, Year(Date("Hiring Date" + IterNo() - 1)) as ActiveYear While "Hiring Date" + IterNo() - 1 <= Alt("Leaving Date", Today()); LOAD [Global ID], [Pers.No.], [First name], Date(Date#([Hiring Dat], 'DD.MM.YYYY') ) AS [Hiring Date], Date(if(len([Leaving Da])<1,date(today()),Date(Date#([Leaving Da], 'DD.MM.YYYY')))) AS [Leaving Date]
What I want to achieve is, when "Leaving DA" is blank, then return today's date.
When I load this from the expression editor with:
=if(len([Leaving Date])<1,today(),Date(Date#([Leaving Date])))
Then everything is fine. But when loaded from the Data load editor, it returns a null value:
What am I doing wrong here?
You could try it with len(trim([Leaving DA])) to check if there are no dates or maybe just doing the check with alt(), like:
alt(Date(Date#([Leaving Da], 'DD.MM.YYYY')), date(today()))
- Marcus