Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

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

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
zagzebski
Creator
Creator
Author

Thanks!