Sql-server – 12 hour format time in SQL datatype

datatypessql servert-sqltime

I can convert time datatype to 12 hour format using convert etc. But is there any option to save the time in 12 hour format in SQL tables using any settings or property or any other methods?

Best Answer

You should not be concerned on how SQL Server stores the data. For now, you should use the TIME data type and if you want the 12 hour format, then convert it in the front end application or during SELECT statement using CAST() or CONVERT()