Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

rido1421
Contributor III

Converting Date format


Hi There

I need to convert the date format on the following date field.

Trim(Replace([lst pym dt],'.','')) as [lst pym dt]

The result of this is 01042014

I need my result to be 20140401

further on in my script I need to be able to multiply the Year, by 100

if(Year(Trim(Replace([lst pym dt],'.','')))* 100 +Month(Trim(Replace([lst pym dt],'.',''))= '201401',[Payment],0)

Thank you.

1 Solution

Accepted Solutions
sushil353
Honored Contributor II

Re: Converting Date format

Hi

Try this:

Date(Date#(Trim(Replace([lst pym dt],'.','')),'DDMMYYYY'),'YYYYMMDD')

HTH

Sushil

5 Replies

Re: Converting Date format

Hi ,

try like this:

Date(expression, 'YYYYMMDD')

sushil353
Honored Contributor II

Re: Converting Date format

Hi

Try this:

Date(Date#(Trim(Replace([lst pym dt],'.','')),'DDMMYYYY'),'YYYYMMDD')

HTH

Sushil

Re: Converting Date format

Hi,

Try this.

date(date#(Trim(Replace([lst pym dt],'.','')),'DDMMYYYY'),'YYMMDD') as [lst pym dt]

Regards

ASHFAQ

deepaktibhe
Valued Contributor

Re: Converting Date format

try

Date(Date#([lst pym dt],'MM-DD-YYYY'),'YYYY-MM-DD')

MVP
MVP

Re: Converting Date format

Date(Date#(Trim(Replace([lst pym dt],'.','')) ,'DDMMYYYY'),'YYYYMMDD') as [lst pym dt]

Community Browser