Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format changing

Hi,

Is it possible to write 2014/w01 as 2013 w01?

If yes, can anyone please tell the logic

Thanks & Regards,

Vinitha.

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Not sure what you want. Assuming it is to change "2014/w1" to "2014 w1" then

Replace('2014/w1', '/', ' ')

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Sokkorn
Master
Master

Hi Vinitha,

Yes, it can. Let try:

=Replace('2014/w01','/',' ')

or

Year(DateField) & ' w' & Num(Week(DateField))

Regards,

Sokkorn

Michiel_QV_Fan
Specialist
Specialist

If your goal is to subtract 1 year from 2014:

addyears(Year(DateField), -1) & ' w' & Num(Week(DateField))

Not applicable
Author

Hi Jonathan,

Thank you for your answer. It really helped me.

Thanks & Regards,

Vinitha.

Not applicable
Author

Hi,

Not sure if I understand you correctly, per my understanding you want to change '/' to space, so you can use:

Replace(2014/w01, '/', ' ')

It will give you 2014 w01)

If you want to use it for a fieldname then :

Replace([DateNum], '/', ' ')

Where DateNum is the fieldname.

Hope this helps!