Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
LapinTerrible
Contributor
Contributor

Converting string to date from a table created by input

 

 

Hello,

Could you please explain why the script isn't generating dates in the 'StartDate' and 'EndDate' columns?

 

Table1:
Load * Inline [

TerrID, Name, Start, End

1, Wladimir, 01-01-2022, 01-01-2022

2, Paul, 01-01-2022, 05-05-2022

2, Mark, 06-05-2022, 01-01-2022

3, Janne, 01-01-2022, 01-01-2022

];


Table2:
Load
TerrID,
Name,
date(Start, 'dd-mm-yyyy') as StartDate,
date(text(End), 'DD-MM-YYYY') as EndDate
Resident Table1;

Labels (2)
1 Solution

Accepted Solutions
LapinTerrible
Contributor
Contributor
Author

Using date# was the answer:


Table1:
Load * Inline [

TerrID, Name, Start, End

1, Wladimir, 01-01-2022, -

2, Paul, 01-01-2022, 05-05-2022

2, Mark, 06-05-2022, -

3, Janne, 01-01-2022, -

];


Table2:
Load
Name,
TerrID,
date#(Start, 'dd-mm-yyyy') as StartDate,
date#(End, 'DD-MM-YYYY') as EndDate

Resident Table1;

View solution in original post

1 Reply
LapinTerrible
Contributor
Contributor
Author

Using date# was the answer:


Table1:
Load * Inline [

TerrID, Name, Start, End

1, Wladimir, 01-01-2022, -

2, Paul, 01-01-2022, 05-05-2022

2, Mark, 06-05-2022, -

3, Janne, 01-01-2022, -

];


Table2:
Load
Name,
TerrID,
date#(Start, 'dd-mm-yyyy') as StartDate,
date#(End, 'DD-MM-YYYY') as EndDate

Resident Table1;