Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reading Dates

Experts ,

Many times I faced dates issues but none of old techniques worked. Could you please help me to read the dates here.

[Output]:

LOAD 

ALT(DATE#(Date,'D/M/YYYY'),DATE#(Date,'DD/M/YYYY'),DATE#(Date,'D/MM/YYYY'),DATE#(Date,'DD/MM/YYYY'))as Date,

Sales

RESIDENT [Dress Sales] ;

But My Output is:

My Source is:

26 Replies
fashid
Specialist
Specialist

Hi Guruprem,

do you have these dates somewhere else also in the application.

This could be a result of cancatenation of dates further in the script where you may not have formatted the date.

If not preferably attach your app.

Regards,

Nadeem

jonathandienst
Partner - Champion III
Partner - Champion III

Try it on the sample you posted. It works there. So it looks like your problem is somewhere else in your data.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Guruprem,

Can you please either change the Date format in excel - DD/MM/YYYY to M/D/YYYY  or change qlikview default date format to  D/M/YYYY ?

SET DateFormat='D/M/YYYY';

While reading data from excel , qlikview has converted valid date formats to number and others are strings. I don't know whether is other solutions, haven't tried it myself

Thanks & Regards,
Vipin

avinashelite

Hi

use this it will work:

=if(IsNum([created Date])=-1,Date(DATE#([created Date],'DD/MM/YYYY')),Date(Date#([created Date],'DD/MM/YYYY'),'DD/MM/YYYY'))

Not applicable
Author

Confident about this , let me check

Not applicable
Author

Tried, Result is same ., Issue still persists

Not applicable
Author

Did u change the format in excel or in qlikview??/

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

Alt(Date(DATE#([created Date],'D/M/YYYY')), Date([created Date])) AS Formatted_Date

FROM DataSource;


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Even this led to the only 11 dates in o/p where as I have 24 dates in Excel

Not applicable
Author

Even this led to the only 11 dates in o/p where as I have 24 dates in Excel