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

Date format

Hi ,

I have date fields like ''YYYYMMDD''..I want to convert it into MM/DD/YYYY

and I have Fiscal week field like  'YYYYWK' ,I want to convert it into 'WK.YYYY'

How do we correct it.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Date(Date#(DateField, 'YYYYMMDD') , 'MM/DD/YYYY')

Right([Fiscal Week],2)&'.'&Left([Fiscal Week],4)        // or, better convert it to date using MakeWeekdate() and then format

View solution in original post

4 Replies
sujeetsingh
Master III
Master III

Use date function

ecolomer
Master II
Master II

=makedate(date, 'MM/DD/YYY')

tresesco
MVP
MVP

Date(Date#(DateField, 'YYYYMMDD') , 'MM/DD/YYYY')

Right([Fiscal Week],2)&'.'&Left([Fiscal Week],4)        // or, better convert it to date using MakeWeekdate() and then format

MarcoWedel

Hi SwathiRaj P,

Dual(Right([Fiscal Week],2)&'.'&Left([Fiscal Week],4), MakeWeekDate(Left([Fiscal Week],4), Right([Fiscal Week],2)))

Will react like a date field, delivering the numerical value of the weeks start date formatted as you specified.

So using this expression enables you to use this field like any other date field, i.e. without any sorting issues and working date calculations.

hope this helps

regards

Marco