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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Please help how to format date

Facing problem when loading date field from excel file.

Please find the excel file and sample model attached.

PR.PNG

The problem is on date format of Start Date  as because my source excel file having start date : 2015/02/23

I have formatted to "dd/mm/yyyy" in excel. But it is showing in excel but pulling wrong data in qlikview.

23 Replies
suvechha_b
Creator III
Creator III
Author

tried but not working

sibideepak
Creator II
Creator II

Hi,

Sometimes some extra spaces in the excel cause this problem,

so when you're loading script try,

date(trim([Start Date]),'DD-MM-YYYY')

Not applicable

You can try at script level like below & use below field in table,

date([Start Date],'dd-mm-yyyy') as New_Start_Date


& let me know what is the output?

suvechha_b
Creator III
Creator III
Author

See the excel file imageCapture.PNG

In excel I formated it in DD/MM/YYY format . it is showing on excel file but when I select it the value is showing "2015/02/23 "

suvechha_b
Creator III
Creator III
Author

When I am using trim I am getting the value correct: "23/02/2015"

But all the other dates are not pulling , they are blank

vardhancse
Specialist III
Specialist III

Once check the default date format in the script editor.

SET DateFormat='DD/MM/YYYY';


Or else in the chart/table where you are seeing the Start date field once check the number format in properties->number<tab>


select Start date->Date

settu_periasamy
Master III
Master III

Hi,

Can you try the below attached excel? i formatted the Start Date and End End using the Text to columns.

Just try this.

senpradip007
Specialist III
Specialist III

Have a look on this.

Not applicable

Hi

do following changes in excel it works,

1) change all start Date custom format to dd/mm/yyyy by selecting each cell value.

In your script do single change like below,

SET DateFormat='DD/MM/YYYY';

& Take [Start Date] field to check resulted field.

suvechha_b
Creator III
Creator III
Author

Can any one help me how to write in expression level.

As I dont want to change the script of qlikview.

Is going to affect other calculation.