I have 2 strings that keep dates which are at this format : 2014-06-26
When I use dateutils.periodbetweendays(string1,string2) i get an invalid double error because of the "-" charachters. Is there any way to get the days difference with this format. ?
Dim date1 As String = "2014-06-23"
Dim date2 As String = "2014-06-26"
Dim oldDateFormat As String = DateTime.DateFormat
DateTime.DateFormat = "yyyy-MM-dd"
DateUtils.PeriodBetweenInDays(DateTime.DateParse(date1), DateTime.DateParse(date2))
DateTime.DateFormat = oldDateFormat
Dim date1 As String = "2014-06-23"
Dim date2 As String = "2014-06-26"
Dim oldDateFormat As String = DateTime.DateFormat
DateTime.DateFormat = "yyyy-MM-dd"
DateUtils.PeriodBetweenInDays(DateTime.DateParse(date1), DateTime.DateParse(date2))
DateTime.DateFormat = oldDateFormat
Parsing code. Error
Error parsing program.
Error description: Undeclared variable 'dateutils' is used before it was assigned any value.
Occurred on line: 213
giorno=DateUtils.GetDayOfWeekName(DateTime.Now)