Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

converting into date

hi ,

the data i am loading has a date format like 20160705 and i need to change it to date format.

is there a way i can change in the load statement?

regards,

marvin

7 Replies
sunny_talwar

Yes you can, try this:

LOAD Date(Date#(DateField, 'YYYYMMDD'), 'MM/DD/YYYY') as DateField

....

Also read here:

Why don’t my dates work?‌‌

Get the Dates Right

Anonymous
Not applicable
Author

use

date#(yourdatefield,'YYYYMMDD')

you can convert it to other dateformat (if not your Standard dateformat)

date(date#(yourdatefield,'YYYYMMDD'),'MM/DD/YYYY')

Anonymous
Not applicable
Author

Please try :

Date(Floor(Date#(your_date_field, 'YYYYMMDD')), 'MM/DD/YYYY')

Not applicable
Author

cool thanks i will give it a shot

Not applicable
Author

The value gives me this 59097/08/16. it seems the year is in string?

florentina_doga
Partner - Creator III
Partner - Creator III

or

=date(MakeDate(left(data,4),mid(data,5,2),right(data,2)),'DD-MMM-YYYY')

Chanty4u
MVP
MVP

try below script with load

Format:

LOAD * INLINE [

    dateformat

    20160705

];

Result:

LOAD *,

Date(Date#(dateformat,'YYYYMMDD'),'MM-DD-YYYY') AS Newdate

Resident Format;

res.PNG