Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Meg00
Contributor III
Contributor III

Change dates in Load

Hello!

I am loading a table with two dates, "startdate" and "enddate". 

The problem here is that the rows that should have null value in "enddate"(rows where an end date really doesnt exist) is set to 1900-01-01 and this is now messing up my calendar obviusly. Is there a way to make every "enddate" with that specifik date set to null?

Thanks

/Meg

1 Solution

Accepted Solutions
teiswamsler
Partner - Creator III
Partner - Creator III

Hi Meg

 

You change the date.

If( enddate = '1900-01-01', null(), enddate ) as endate.

But nowyou cant select the null() enddates

 

Br.
Teis

 

View solution in original post

2 Replies
teiswamsler
Partner - Creator III
Partner - Creator III

Hi Meg

 

You change the date.

If( enddate = '1900-01-01', null(), enddate ) as endate.

But nowyou cant select the null() enddates

 

Br.
Teis

 

jonathandienst
Partner - Champion III
Partner - Champion III

It would appear that the value is neither null, nor zero. A date of 1900-01-01 is a number greater than 0 and less than or equal to 1. if there is no time component, then 1900-01-01 ==  a value of 1.00. You could force these values to null during your load -- something like

LOAD ...
  If (startdate < MakeDate(2019), null(), startdate) as startdate,
 ...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein