im using this to convert a date
_dtestart = Date.Parse("20/04/2007")
This gives no errors when testing the program on the device it , does so on the emulator , anyone know why ?
Printable View
im using this to convert a date
_dtestart = Date.Parse("20/04/2007")
This gives no errors when testing the program on the device it , does so on the emulator , anyone know why ?
Hi,
take a look at the regional settings on the PC - my guess is they are set to US
Pete
the best way to parse a date is to use yyyy/mm/dd as this does not cause a problem if you regional settings are set for having dates in the format dd/mm/yyyy
Well ive been using date.parseexact or , Cdate("") too , with every possible "dd/MM/yyyy" and stuff , but still no avail , constant format exception.
As long as it works on the device im fine tho.
_dtestart = Date.Parse("2007/04/20") should work everytime
Have you checked out Pete's suggestion? I think you have a different regional setting on each one. That's a european style date, which won't do so well in a non-european setting.
Im dont have the rights to change regional settings so cant really try that out.
But i think Pete's solution is the most viable , this computer is set with US settings the PDa is with European settings.
thx