ObjectDataSource fails to parse string to DateTime

前端 未结 1 1243
孤城傲影
孤城傲影 2021-01-21 08:46

I have a textbox with value that stores ValidFrom form value:

31.01.2012

and cultures set to:



        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 09:14

    As far as I know the culture info is loaded directly from the OS ( in this case windows), you can check on your regional setting for the format specified. This is a screenshot from my pc:

    http://imageshack.us/photo/my-images/96/engbg.png/

    As you can see the format for short date is: dd/MM/aa, so maybe there is something going on with your server regional settings or the input should be: 31/01/12 instead of 31.01.2012

    Hope this helps.

    0 讨论(0)
提交回复
热议问题