
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Storing table into CSV changes date format
Hi All,
I am encountering a bizarre issue where storing a Qlik sense table into CSV file format is messing up the date format. Some dates are getting converted into text format. If I keep the date format as M/DD/YYYY, it is showing properly. But I want to store the dates in DD-MM-YYYY format. This is where I am struggling.
Any help in solving this issue would be greatly appreciated.
Regards,
Aditya
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks everyone for your help but on further digging, I found out that the issue was related to the system on which I was viewing the CSV. When viewed on a different system, the dates were displayed in the desired format and uniformly.
Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share the code that creates the table which you want to store? Have you tried formatting the date with Date(DateField, 'DD-MM-YYYY') AS DateFormatted? Have you tried changing your global variables to match the desired format?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If storing the dates while still formatted as a date doesn't work, you could try converting them to a formatted string.
Text(Date(YourDateField, 'DD-MM-YYYY'))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't modified much in the code. I am pulling the data from an excel file which has source data formatted as DD-MM-YYYY. Now I am applying incremental load and just storing the table as .csv file. But when I open the csv file, some dates are showing in text format.
I tried converting using Date() function but it isn't helping. The only uniform format of dates that is working in csv file is M/DD/YYYY. Only in this format, all dates are getting formatted uniformly.
Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which date format is specified in your global app variables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Earlier it was M/D/YYYY. I changed it to DD-MM-YYYY and stored csv. Still same result.
Regards,
Aditya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you be able to post some rows of your original data or file containg all the various date formats as an Excel file? That would certainly help investigating.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this:
Date(Date#(YourDateField, 'DD-MM-YYYY'), 'DD-MM-YYYY') as YourDateField

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The date can simply be converted to a number, and formatting can be done after.
Alternatively, you might use the Alt function.

- « Previous Replies
-
- 1
- 2
- Next Replies »