I have a month key which look like this "201208".
I am reading the data from SQL and returning as a DataTable.
Then I am looping through my DataTable.
For Each dr As DataRow In dt.Rows
Dim s As String = dr.Item(0)
Next
My s would be a string looking like this "201208"
How convert this string into year, first day of the month and last day of the month?
Looking for a way to split the string into two seperate dims.
Any suggestions much appreciated.
The easiest way is to just parse the string as
Date, then calculate the last day of the month.Try the following: