Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stascher
Partner - Creator II
Partner - Creator II

How to prevent conversion of string to date

In my database, I have a SQL table containing varchar Employee IDs that Qlik is attempting to convert to dates and I don't know why. For example: 

EmployeeID Qlik is auto-converting to:
710-02-027 710-02-027 as a date/dual value
710-02-028 710-02-028 as a date/dual value
710-02-029 710-03-001 as a "corrected" date/dual value
710-02-030 710-03-002 as a "corrected" date/dual value
710-02-031 710-03-003 as a "corrected" date/dual value
710-02-032 710-02-032 as a string value
710-02-033 710-02-033 as a string value
710-02-034 710-02-034 as a string value

 

As you can imagine, this is causing havoc to my data model.

Within my app...

the DateFormat setting is: SET DateFormat='M/D/YYYY';

the load script simply queries this field using:  Select EmployeeID as "Employee ID";

I've tried casting EmployeeID as varchar in the above script and it doesn't make an difference. 

Can someone please tell me how to stop Qlik from auto-converting these values into dates and only load them as the strings they are stored as?

Thank you very much.

Steve

 

Labels (3)
1 Solution

Accepted Solutions
BrunPierre
Master
Master

Hi @stascher , Text() will force interpretation as text.

Text(EmployeeID) as EmployeeID

View solution in original post

2 Replies
BrunPierre
Master
Master

Hi @stascher , Text() will force interpretation as text.

Text(EmployeeID) as EmployeeID

stascher
Partner - Creator II
Partner - Creator II
Author

Thanks. I actually found the solution on my own but since you were nice enough to answer I'll give you credit for it. 

-Steve