I have an Event table with a column called start_date of datatype DateTime. From C# application date is showing up like 07/12/2011 and when saved in table its like 2011-08-12 11:00:00.000.
How can I make this format of date be saved like 2011-12-08 11:00:00.000 instead of above?
I am not using a stored procedure/function in SQL Server, instead I’m using Entity Framework. I want that date auto formatted and saved like above.
anyone please.
The datetime in SQL Server isn’t stored in any string-based format – it’s stored as a numerical 8-byte value.
The string representation you see is the default representation defined by your language/regional settings, and the date format setting in SQL Server.