DateTime.Date(DateTime.Now) errors

davelt99

Member
Licensed User
Longtime User
dim sDate,sTime as string

DateTime.DateFormat = "MM/dd/yyyy"
sDate=DateTime.Date(DateTime.Now)
sTime=DateTime.Time(DateTime.Now)

The actual date and time was 4/14/12 at 8:53:12 AM

sDate returned 3/22/2012 and sTime returned 15:42.24

My machine PC date and time are also correct. Would anyone have any thoughts on why erroneous dates and times are being returned ?

Any suggestions would be greatly appreciated.
Thank you,
Dave Tucker
 

RiverRaid

Active Member
Licensed User
Longtime User
Hi!

Are you using the Android-Emulator?

Then you have to set the correct date and time in the Emulator as well
-Hint: if you close the Emulator and start it f.i 2 days later, you have to adapt the time/date again inside the emulator...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…