locked
DateFormat issue on web form . RRS feed

  • Question

  • User1253338400 posted

    Hi ,

    I have set my language on the browser to Solvak.. Now the date is set to d.MM.yyyy.  

    But my  my UserContext.DateFormat is set to  d. MM. yyyy (notice the spaces) I have sewt the date format in the language / date format but still no diofference. 

    So if i format the date on a html input box it gives me d. MM. yyyy  , there are spaces and this seems to cause an error im my formatting routine.

    Is there a standard way of getting the text in a input box and when posting to the server / db which has a diferent format .. it will be  formatted and sent correctly no matter what the language is ?

    cheers

    Robby

    Wednesday, June 29, 2011 6:13 AM

Answers

All replies

  • User-269404413 posted

    Robby,

    just read this page http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx then customize it as per your requiremnt

    Wednesday, June 29, 2011 7:46 AM
  • User1253338400 posted

    Hi,

    the parseexact requires the string to be in the exact format . In my case i dont know what the exact format of the date will be.  

    the user could be in Hungary and have a format .. or in Europe  or Asia .. I was looking for a routine that will take the string  in the format and convert and extract the day month and year .

    cheers

    Wednesday, June 29, 2011 7:59 AM
  • User-1828494216 posted

    Hi,

    please get the date from the user and convert it to DateTime Structure (System) before inserting it into DataBase.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 29, 2011 8:10 AM