insert datetime value in sql database with c#

后端 未结 8 1773
死守一世寂寞
死守一世寂寞 2020-11-30 05:29

How do I insert a datetime value into a SQL database table where the type of the column is datetime?

8条回答
  •  隐瞒了意图╮
    2020-11-30 06:07

    It's more standard to use the format yyyy-mm-dd hh:mm:ss (IE: 2009-06-23 19:30:20)

    Using that you won't have to worry about the format of the date (MM/DD/YYYY or DD/MM/YYYY). It will work with all of them.

提交回复
热议问题