i have textbox that contain string month and year value, example: January 2010
but i want to save it into mysql database with format 201001 --->year and then number of month
how can i convert this string?
i have textbox that contain string month and year value, example: January 2010
but i want to save it into mysql database with format 201001 --->year and then number of month
how can i convert this string?
Based from this link, maybe you can try this:
Dim dateval As String = "January 2010"
Dim year As String = dateval.Split(" "C)(1)
Dim month As String = DateTime.ParseExact(dateval.Split(" "C)(0), "MMMM", CultureInfo.CurrentCulture).Month.ToString()
Dim yourdateval As String = String.Concat(year, month)