Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
zagzebski
Contributor

Previous Month from text field

I have an "Effective Date" text field in the following format:

ex.  Effective Date = 20140410  ( April 10 of 2014)

I need to be able to change this to a text field that would represent the previous month (in a YYYYMM format):

20140410  becomes 201403

20140115  becomes 201312

Thanks for any help in advance,

Steve

Tags (2)
1 Solution

Accepted Solutions

Re: Previous Month from text field

date(monthstart( date#([Effective Date], 'YYYYMMDD'),-1),'YYYYMM')


talk is cheap, supply exceeds demand
2 Replies

Re: Previous Month from text field

date(monthstart( date#([Effective Date], 'YYYYMMDD'),-1),'YYYYMM')


talk is cheap, supply exceeds demand
zagzebski
Contributor

Re: Previous Month from text field

Thanks!

Community Browser