Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gokulnath2592
Contributor III
Contributor III

String date to num date

Hi all,

In my data, date is in string format.I want to converted it in to number format.

I used below query for the conversion.

date(date#([AssignEndDt  ],'MM/DD/YYYY'),'MM/DD/YYYY') as end_date

but it was not working.

9 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

You need to take care of format masking.

Can you upload few sample data to look over.

Regards

ASHFAQ

gokulnath2592
Contributor III
Contributor III
Author

qlik.PNG
Hi ashfaq,

I attached my data above.

ashfaq_haseeb
Champion III
Champion III

Try like this

date(date#([ProjEndDt],'M/DD/YYYY HH:MM TT'),'MM/DD/YYYY')

or

=date(date#('1/31/2016 12:30 AM','M/D/YYYY hh:mm tt'), 'MM/DD/YYYY')

Regards

ASHFAQ

jonathandienst
Partner - Champion III
Partner - Champion III

Hi


date(date#([AssignEndDt  ],'M/D/YYYY hh:mm tt'), 'MM/DD/YYYY') as end_date


HTH

Jonathan



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gokulnath2592
Contributor III
Contributor III
Author

Ashfaq,

I tried your query, Again same will be displayed

gokulnath2592
Contributor III
Contributor III
Author

jonathan,

I tried your query its working now.

Thanks,

Gokul

ashfaq_haseeb
Champion III
Champion III

Try like this

=date(date#('1/31/2016 12:30 AM','M/D/YYYY hh:mm tt'), 'MM/DD/YYYY')

Can you upload your app

Regards

ASHFAQ

gokulnath2592
Contributor III
Contributor III
Author

Ashfaq,

sorry, I cant upload app.

thanks for your help, date format is changed.

Thanks,

gokul

gokulnath2592
Contributor III
Contributor III
Author

thank you guys for your help

Regards,

gokul