Discussion Board for collaboration on QlikView Scripting.
I am pulling date data in from a SQL query and need it to be in MM/DD/YYYY, but it stays in SQL's default YYYY-MM-DD
I have tried:
To add to the craziness is that the line before this I have: date(DDATE)&Market as key, and the result is in MM/DD/YYYY
Any help would be awesome
Go to Solution.
Did you try date(date#(DDATE,'YYYY-MM-DD'),'MM-DD-YYYY')?
The date#() specifies how the date is and the date() specifies how you would like it to be.
Where are you doing the date transformations in the script, in the SQL SELECT statement or a preceding LOAD statement?
The preferred way is to do it in the LOAD, transformations in the SQL SELECT are processed by the SQL database which may or may not support them.
An example of your script would help.
What are the outcomes of your transformation?
Are the numbers or Text?
Can you post a sample qvw
LOAD date(DDATE)&Market as key,
date(DDATE) as DDATE
date(DDATE) as DDATE has been replaced with all of the before mentioned variations without any success. The results all look like 2015-02-01
date(DDATE)&Market as key, produces results like 02/01/2015City
Yes I did. It did not produce the expected result.
what data type is your date field in SQL please?
Why not convert it into the correct format in SQL?
select Convert(VarChar(10), Your_Date_Field,101) from your_table
What do you have here: