Hi,
In a stored procedure in SQL Server 2008, I need to parse strings like "12M" and return 12 * 30 days as an int. So, I am basically parsing and calculating the number of days the string represents.
I am not sure how this can be done.
I am thinking to do a while loop over each character in the string. Any suggestion?
Edit (not author): It appears the goal is to convert "xM" to "x Months in days" (30 days/month), "yY" to "y Years in days" (365days/year), and "zD" to "z Days" (no transformation).