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: 
rido1421
Creator III
Creator 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
Master II
Master II

Hi

Try this:

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

HTH

Sushil

View solution in original post

5 Replies
avinashelite

Hi ,

try like this:

Date(expression, 'YYYYMMDD')

sushil353
Master II
Master II

Hi

Try this:

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

HTH

Sushil

ashfaq_haseeb
Champion III
Champion III

Hi,

Try this.

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

Regards

ASHFAQ

deepakqlikview_123
Specialist
Specialist

try

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

MK_QSL
MVP
MVP

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