Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert to text date to date

Hello,

I want to convert the following date (getting as text from database) to date format as 'YYYY-MM-DD': "2009-12-18T10:30:38.000Z".

Following command is not working because it is a text:

date('2009-12-18T10:30:38.000Z', 'YYYY-MM-DD');

Thanks

Samir

1 Solution

Accepted Solutions
kaushalview
Partner - Creator II
Partner - Creator II

Hi,

Samir

Try this its working

=date(makedate(left('2009-12-18T10:30:38.000Z',4),mid('2009-12-18T10:30:38.000Z',6,2),mid('2009-12-18T10:30:38.000Z',9,2)),'YYYY-MM-DD')

regrads

Kaushal mehta

View solution in original post

2 Replies
Not applicable
Author

date(date#(myDate,'YYYY-MM-DD hh:mm:ss.fff),'YYYY-MM-DD')
It's possible that you have to loose the T and Z since that can't be found in documentation.

kaushalview
Partner - Creator II
Partner - Creator II

Hi,

Samir

Try this its working

=date(makedate(left('2009-12-18T10:30:38.000Z',4),mid('2009-12-18T10:30:38.000Z',6,2),mid('2009-12-18T10:30:38.000Z',9,2)),'YYYY-MM-DD')

regrads

Kaushal mehta