Best way to store time (hh:mm) in a database

前端 未结 15 2169
面向向阳花
面向向阳花 2020-11-29 18:58

I want to store times in a database table but only need to store the hours and minutes. I know I could just use DATETIME and ignore the other components of the date, but wha

15条回答
  •  广开言路
    2020-11-29 19:35

    since you didn't mention it bit if you are on SQL Server 2008 you can use the time datatype otherwise use minutes since midnight

提交回复
热议问题