Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Srinivas
Creator
Creator

When we export to excel then i'm facing date formatt issues

Hi All,

Please see below code, Here in Qlikview front-end level showing correct format , but when we are export into excel or csv file then it's showing problem.

Date:

LOAD 
Date(OrderDate,'YYYY-MM-DD') as OrderDate,
Date(RETD,'YYYY-MM-DD') as RETD,
Date(CETD,'YYYY-MM-DD') as CETD,
UnitCostOfLine
FROM

(
qvd);
STORE Date into D:\Personal\Test.Csv(txt);


Qlikview front-end report see below :

orderdate ,RETD CETD

2014-12-02,2015-02-06,2015-02-06

2014-12-02,2015-02-13,2015-02-13

2014-12-02,2015-02-20,2015-02-20

2014-12-02,2015-02-27,2015-02-27

2014-12-02,2015-02-03,2015-02-03


Csv output : this below one is wrong .... I want to see above qlikview front-end format..

  

OrderDateRETDCETDUnitCostOfLine
02-12-201406-02-201506-02-2015
02-12-201427-02-201527-02-2015
02-12-201406-02-201506-02-2015
02-12-201427-02-201527-02-2015
02-12-201406-02-201506-02-2015
02-12-201403-03-201503-03-2015
02-12-201420-02-201520-02-2015
02-12-201413-02-201513-02-2015
02-12-201420-02-201520-02-2015
02-12-201406-02-201506-02-2015
02-12-201427-02-201527-02-2015
02-12-201406-02-201506-02-2015
02-12-201403-03-201503-03-2015
02-12-201420-02-201520-02-2015
02-12-201406-02-201506-02-2015



Could you please help on this.


Thanks & Regards,

Munna



5 Replies
sunny_talwar

Your front end table doesn't have UnitCostOfLine may be you want to remove that field before you save?

Best,

Sunny

Srinivas
Creator
Creator
Author

Hi Sun,

As of now  UnitCostOfLine is not required but I want to see correct date format in excel level.when am apply in script level code that's worked in qlikview front level.

But after export to excel or csv file through store command then it's not coming correct format.

Advance Thanks,

Munna

robert_mika
Master III
Master III

The only option I see is to save as Text.

After Store,Open the file and fallow the wizard as you get to this stage2015-04-02 01_28_25-Text Import Wizard - Step 3 of 3.png

Result

2015-04-02 01_30_14-Microsoft Excel - Test.xls.png

Alejandro_Hernández
Former Employee
Former Employee

Are you seeing this date format in excel or opening the .csv file in notepad?

This is how the generated .csv looks in notepad:

OrderDate,RETD,CETD,UnitCostOfLine

2014-12-02,2015-02-06,2015-02-06,

2014-12-02,2015-02-27,2015-02-27,

2014-12-02,2015-02-06,2015-02-06,

2014-12-02,2015-02-27,2015-02-27,

2014-12-02,2015-02-06,2015-02-06,

2014-12-02,2015-03-03,2015-03-03,

2014-12-02,2015-02-20,2015-02-20,

2014-12-02,2015-02-13,2015-02-13,

2014-12-02,2015-02-20,2015-02-20,

2014-12-02,2015-02-06,2015-02-06,

2014-12-02,2015-02-27,2015-02-27,

2014-12-02,2015-02-06,2015-02-06,

2014-12-02,2015-03-03,2015-03-03,

2014-12-02,2015-02-20,2015-02-20,

2014-12-02,2015-02-06,2015-02-06,

This is how it looks in Excel:

  

OrderDateRETDCETD
02-12-1406-02-1506-02-15
02-12-1427-02-1527-02-15
02-12-1406-02-1506-02-15
02-12-1427-02-1527-02-15
02-12-1406-02-1506-02-15
02-12-1403-03-1503-03-15
02-12-1420-02-1520-02-15
02-12-1413-02-1513-02-15
02-12-1420-02-1520-02-15
02-12-1406-02-1506-02-15
02-12-1427-02-1527-02-15
02-12-1406-02-1506-02-15
02-12-1403-03-1503-03-15

Excel uses the date format you  defined in Control Panel-Regional Settings.

Srinivas
Creator
Creator
Author

HI Robert,

can we change in Qlikview edit script level that would be better, this is only sample file like this I have to export every day lot of files so that can you give any idea.

Advance Thanks,

Munna