Link to home
Start Free TrialLog in
Avatar of dinmatt
dinmattFlag for United States of America

asked on

Decrement last characters of a string

I have a string like this: "2012-13". I want to reduce the last characters on each side of the hyphen by 1 so that it becomes 2011-12. The string represents the current payment year and is stored in a setup table. I want to be able to write a query that will allow me to enter in the criteria row payments recorded for the current payment year and the prior payment year. ie, 2012-13 and 2011-12. Can anyone provide a solution for this that I could use?
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dinmatt

ASKER

Thank you gustav, that works perfectly and is easy to implement!
You are welcome!

/gustav