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

How to convert 0032018 into dd/mm/yyyy

Hi All,

I have data '0032018' in date field and I want it to convert into dd/mm/yyyy like '01/03/2018'

plz help.

 

thank you.

 

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

always 0 as day?
if so try this approach
=Date(MonthStart(Date#('1'&'0032018','DDMMYYYY')),'DD/MM/YYYY')
return 01/03/2018

in your scrpt
Date(MonthStart(Date#('1'&DATEFIELD'DDMMYYYY')),'DD/MM/YYYY') as NewDateField

View solution in original post

8 Replies
dplr-rn
Partner - Master III
Partner - Master III

What does other date values look like.
Do You always want it as start of the month?
daya
Contributor II
Contributor II
Author

Yes I want it as start of the month and other date values are also in same format.
dplr-rn
Partner - Master III
Partner - Master III

always 0 as day?
if so try this approach
=Date(MonthStart(Date#('1'&'0032018','DDMMYYYY')),'DD/MM/YYYY')
return 01/03/2018

in your scrpt
Date(MonthStart(Date#('1'&DATEFIELD'DDMMYYYY')),'DD/MM/YYYY') as NewDateField
dplr-rn
Partner - Master III
Partner - Master III

basically force a dummy day value (always day 10 in this case) and then use monthstart to move to start of month and then format it
Sue_Macaluso
Community Manager
Community Manager

@daya Is this for QlikView or Sense? I would like to move this into the correct product forum. 

Did you find a solution to your question? Mark the solution as accepted : and if you found it useful, press the like button!
jayaramp
Contributor II
Contributor II

Hi,

 

Believe following is the expression you are looking for.

 

Date(Date#(DateFieldName,'DDMMYYYY'),'DD/MM/YYYY')

 

Thanks!

daya
Contributor II
Contributor II
Author

This is for Qlik Sense.
daya
Contributor II
Contributor II
Author

@dplr-rn thanks..it works