
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Convert YYYYMMDD to DD/MM/YYYY - Self-learning Qlikview Newbie
Hi
I am trying to load data from SQL server using a OLE DB connection and would like to convert the data in the columns suffixed with the word Date (in Bold) from YYYYMMDD to DD/MM/YYYY format. Please Help.
The script I am using to load the data is:
SQL SELECT AccountingYearMonth as AccountingPeriod,
AdmiDate AS StartDate,
Age,
SpellDisDate AS DischargeDate,
SpellDominantProcedure AS DominantProcedureSpell,
SpellLoS AS LoS,
FROM SLAM.dbo."1415SLAMTAS";
Please reply with an amendment to the script
many thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If QV interpretes the dates correctly, you just need to format in a preceding LOAD (or use formatting options of your source DBMS in the SQL part):
LOAD
AccountingPeriod,
Date(StartDate, 'DD/MM/YYYY') AS StartDate,
Age,
Date(DischargeDate,'DD/MM/YYYY') AS DischargeDate,
DominantProcedureSpell,
LoS;
SQL SELECT AccountingYearMonth as AccountingPeriod,
AdmiDate AS StartDate,
Age,
SpellDisDate AS DischargeDate,
SpellDominantProcedure AS DominantProcedureSpell,
SpellLoS AS LoS,
FROM SLAM.dbo."1415SLAMTAS";


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are some useful posts on dates and formatting here:
https://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date(Date#(AdmiDate, 'YYYYMMDD'), 'DD/MM/YYYY') AS StartDate
Date(Date#(SpellDisDate, 'YYYYMMDD'), 'DD/MM/YYYY') AS DischargeDate
