Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Tags (1)
1 Solution

Accepted Solutions
kaushalview
Contributor II

Convert to text date to date

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

2 Replies
Not applicable

Convert to text date to date

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
Contributor II

Convert to text date to date

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

Community Browser