Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dana
Creator II
Creator II

Dates saved to CSV as Text displayed as Date

Hi People,

I have issue with dates which do not have the same format.

I loaded them as Text, and after exporting them to a CSV file, they still maintain their original format:

Dates in CSVDates in CSV

 

 

 

 

 

 

 

Exporting to Excel does not have that issue.

Dates in ExcelDates in Excel

BTW, If I open the CSV file in Office 365, there is no issue.

Any idea how to resolve it?

Thanks!

 

Labels (1)
1 Solution

Accepted Solutions
dana
Creator II
Creator II
Author

The solution was finding an Excel version that opens the CSV without any issue...

View solution in original post

3 Replies
marksouzacosta
Partner - Specialist
Partner - Specialist

Hi @dana,

Note sure if I understand the problem. CSV's don't have a type associated to its columns, they are always considered text. So, if you open your CSV using Notepad you should see the same format specified in your load script - if you have created the CSV using Qlik.

Now, when you open a CSV in Excel, you are subject to Excel's interpretation of the values. You can try to tell Excel which type, and format are the columns or maybe even some other advanced stuff like creating an Excel file and use a CSV file as a Data Source to populate the Excel file and them dealing with the date format using other Excel ways.

Read more at Data Voyagers - datavoyagers.net
dana
Creator II
Creator II
Author

Hi @marksouzacosta,

In Notepad as well as in Excel, indeed, there is no issue.

The question is why when opening the CSV file created by QlikView, a text is displayed both in General or in Date format.

How come the original format is somehow kept after converting the date into text:

Text(date) AS Date -Text.

Thanks!

dana
Creator II
Creator II
Author

The solution was finding an Excel version that opens the CSV without any issue...