I have a date in dd-mmm-yy format. I extracted the two digit year and need to increase or decrease by one year. How can I use the code below to return the two digit year?
I realize I can add a check to see if the first digit is a 0 and take the appropriate action or change the date format to a four digit year before calculating, but I'm wondering if there is simpler way to do it, like using the format function or similar.
Thanks - Kevin
Code:
If year1 = "09" Then
year2 = year1 - 1
End If
Thanks - Kevin