I know I cannot mathmatically subtract 1 from a string value, but I also do not know how to truly convert a string to integer, do my subtraction, then convert back to a string so I can continue using the string value. So, this is what I have:
Dim cyclesQuery As String = "SELECT id, CONCAT(DATE_FORMAT(start, '%m/%d'), ' to ', DATE_FORMAT(end, '%m/%d')) AS duration, ROUND(DATEDIFF(end, start) / 7) AS weeks FROM cycles WHERE YEAR(start) = ?yid ORDER BY id"
To populate the yid field, then used as below to gather the correct year of data.
Dim searchQuery As String = Request.QueryString("yid") & "-" & String.Format("{0:d2}", i) & "-" & "01" The format has changed from gathering Jan - December data of same year to now needing to gather October of one year to September of the following year. Any suggestions to assist me in this would be helpful.
The currect value of yid is 2013. I need it to be 2012 within a loop (3 occurances) and then convert back to string so I can continue using it, of course it will need a different name once it is converted.