c# - Unified Date format with no reliance to the server/system -


i have asp.net / c# web site i'm building, in 1 of pages i'm asking user choose date date picker of own send date code-behind in "dd/mm/yyyy" format.

the problem starts when site online, computer using "dd/mm/yyyy" format , server uses "mm/dd/yyyy" format, when try convert date received in code-behind datetime type using "conver.todatetime()" on own pc works fine, when site online, if date example "14/05/2015" cause 'string not recognized valid datetime.' error, since it's trying convert format causes illegal date (5th day of 14th month).

what's best elegant solution problem? thanks.

send date in fixed format, iso (yyyy-mm-dd). if parties use same format, there no ambiguity.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -