Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conversion date from YYYY-MM-DD to YYYYMMDD

I am loading date field YYYY-MM-DD


An example : 2014-02-10


How can I load date field as YYYYMDD ?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Please dont duplicate the thread..

Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMMDD') as YourDateField

View solution in original post

8 Replies
MK_QSL
MVP
MVP

Please dont duplicate the thread..

Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMMDD') as YourDateField

robert_mika
Master III
Master III

Try:

Table:

LOAD * INLINE [

data

2014-02-10

];

t2:

load

Date(data,'YYYYMDD') AS DATE

Resident Table;

Drop Table;

sunny_talwar

Or

Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMDD') as YourDateField


If you need YYYYMDD (assuming it was not a typo)

MK_QSL
MVP
MVP

It should be a typo as

2015115 could be 15th Jan 2015 or 5th November 2015..

MK_QSL
MVP
MVP

No I am wrong... ! It will work as YYYYMDD

sunny_talwar

I agree

I feel dumb now.

MK_QSL
MVP
MVP

YYYYMDD will work but YYYYMD will not !

Load

  Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMMDD') as YourDateField1,

  Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMDD') as YourDateField2,

  Date(Date#(YourDateField,'YYYY-MM-DD'),'YYYYMD') as YourDateField3

Inline

[

  YourDateField

  2015-01-15

  2015-11-5

];

YourDateField1 YourDateField2 YourDateField3
2015011520151152015115
20151105201511052015115
Sarah_Miller
Former Employee
Former Employee

Greetings

 

Thanks for your post in Qlik Community. I have moved your post to the App Development sub community. Based on the content of your post I think it will be visible to more members in the new location.

The Education group is only for questions related to training, certification, and any programs we offer.

Thank you,

Sarah Miller