Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Data extraction issue - date format

In database, date is 27-03-14 but when I am extracting the same through QV the date format is getting changed to 03/14/2027.

Note: There are multiple date formats present in the DB and there are multiple date columns present in the script if i change the default setting of date format then it will be applicable for all.

I have to correct the above mentioned date format only.

If anyone have the idea how to sort out this situation then please share the solution.

3 Replies
Highlighted

Re: Data extraction issue - date format

you could try with loading like

Date(Date#('27-03-14','DD-MM-YY')) as YourDateField

hope this helps

regards

Marco

Specialist
Specialist

Re: Data extraction issue - date format

First check your main script

SET DateFormat = 'DD-MM-YYY'

and then while loading use

Date(Date#('27-03-14','DD-MM-YY')) as YourDateField

Highlighted
Specialist III
Specialist III

Re: Data extraction issue - date format

You do not have to change your default environmental setting to get the date format you're willing.

Read more about function Date# https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterpretationFunction...

and Date https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/date-time-interpretati...

For example my default Date setting is:

SET DateFormat='YYYY.MM.DD';


But in case DB provides date like 30102010 I can write an expression:

=Date(Date#('30102010', 'DDMMYYYY'), 'DD-MM-YY')

Screenshot_1.jpg