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

Dates

Good afternoon,

I don't know how I can convert a Date from Excel sheet in numeric format.

I received from Excell:    '01/03/2014' and I want stored in a QVD as 20140301.

Thanks a lot for your help.

15 Replies
PrashantSangle

Hi,

Use Date(Date#(datefield,'DD/MM/YYYY'),'YYYYMMDD') as NewDate,

Regards,

PS

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
its_anandrjs

Change like 

Num(Date#('01/03/2014','DD/MM/YYYY')) as NewDatefield,

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

Not applicable
Author

I am sorry, I receive from Excell    01/03/2014 20:27 and the result shoud be 20140301

PrashantSangle

Hi,

Try this,

Date(Date#(datefield,'DD/MM/YYYY hh:mm'),'YYYYMMDD') as NewDate,

Regards,

PS

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
yduval75
Partner - Creator III
Partner - Creator III

Date(Datefield,'YYYYMMDD'')

its_anandrjs

New Update please check now Actually your date is time stamp date..

Change like below

Date(Timestamp#(DateField,'DD/MM/YYYY hh:mm'),'YYYYMMDD') as NewDate


and


Num(Date(Timestamp#(DateField,'DD/MM/YYYY hh:mm'),'YYYYMMDD')) as NewDate


and


Date(Timestamp#('01/03/2014 20:27','DD/MM/YYYY hh:mm'),'YYYYMMDD')










MK_QSL
MVP
MVP

Try below in script.


NUM(FLOOR(Date#('01/03/2014 20:27', 'DD/MM/YYYY hh:mm'))) as NEWDATE

or

NUM(FLOOR(Date#(YourDateField, 'DD/MM/YYYY hh:mm'))) as YourDateField

or

Date(FLOOR(Date#(YourDateField, 'DD/MM/YYYY hh:mm')),'YYYYMMDD') as YourDateField





Not applicable
Author

I put:

Date(Date#([Fecha del Ticket], 'DD/MM/YY HH:MM'), 'YYYYMMDD') as NewDate

And in the QVD the field is in blank

Not applicable
Author

Thanks a lot Joan and Anad