it's 1400h (new york time), march 27, 2015 as i write this. my device indicates a friday
however, my app says march 27, 2015 is day 6. (per attached image)
here's the code:
Dim now As Long = DateTime.now
Dim hour As Int = DateTime.GetHour(now) ' 0-23
Dim day As Int = DateTime.GetDayOfWeek(now) ' 1-7 7=sunday
Msgbox( DateTime.Date(now) & " hour = " & hour & " " & "day = " & day,"")
i normally don't use datetime functions, and since the documentation says sunday is day 7, friday should be day 5. the msgbox output came as a surprise. how did i mess this up?
-go
however, my app says march 27, 2015 is day 6. (per attached image)
here's the code:
Dim now As Long = DateTime.now
Dim hour As Int = DateTime.GetHour(now) ' 0-23
Dim day As Int = DateTime.GetDayOfWeek(now) ' 1-7 7=sunday
Msgbox( DateTime.Date(now) & " hour = " & hour & " " & "day = " & day,"")
i normally don't use datetime functions, and since the documentation says sunday is day 7, friday should be day 5. the msgbox output came as a surprise. how did i mess this up?
-go