Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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

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

michielvandegoo
Specialist
Specialist

If your goal is to subtract 1 year from 2014:

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

Not applicable

Hi Jonathan,

Thank you for your answer. It really helped me.

Thanks & Regards,

Vinitha.

Not applicable

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!