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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue loading date fields from excel

I have an excel with some date fields in format DD/MM/YYYY.

In my script I load the excel sheet loading this fields without any conversion.

Load

     Init_Date,

     End_Date

FROM [My Excel path]

Once data loaded I can see QlikView has loaded them as number instead of DD/MM/YYYY

I have tried to put this at the beginning of the script but without success:

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='#.##0,00 €;-#.##0,00 €';

SET TimeFormat='h:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';

SET MonthNames='ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sep.;oct.;nov.;dic.';

SET DayNames='lu.;ma.;mi.;ju.;vi.;sá.;do.';

3 Replies
sunny_talwar

How about doing this?

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='#.##0,00 €;-#.##0,00 €';

SET TimeFormat='h:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';

SET MonthNames='ene.;feb.;mar.;abr.;may.;jun.;jul.;ago.;sep.;oct.;nov.;dic.';

SET DayNames='lu.;ma.;mi.;ju.;vi.;sá.;do.';

Load

    Date(Init_Date) as Init_Date,

    Date(End_Date) as End_Date

FROM [My Excel path]

ToniKautto
Employee
Employee

Perhaps can be worth double-checking that the dates in the excel sheet are really formatted as Dates, and not General or any other data type.

Anonymous
Not applicable
Author

Agreed with Toni Kautto

You might need to use Date(Date#(Field,Format)), if that is the case, like this?

Date(Date#(Init_Date, 'DD/MMM/YYYY')) as New Date