SSMS does not have a button or a magic display function. When you execute the query, SSMS will display this column in a format suitable for this data type; for the datetime field, which will include the time.
If you do not want to include time, then you need either CAST or CONVERT separate columns, or format the data accordingly at the presentation level (for example, if you are using Excel, then dd / MM / yyyy may be appropriate).
If all your columns have '00:00:00.000' at the end of their value, the problem is not in the display format, this is your choice of data type. Obviously, the problem is not that SSMS returns the time for the date**time** column, it means that you declared the column as datetime when it should have been date . You can change the data type of a column using ALTER . For instance:
USE Sandbox; Go CREATE TABLE TestTable (ID smallint IDENTITY(1,1), DateColumn datetime); INSERT INTO TestTable (DateColumn) VALUES ('20180201'),('20180202'),('20180203'),('20180204'),('20180205'); SELECT * FROM TestTable; GO ALTER TABLE TestTable ALTER COLUMN DateColumn date; GO SELECT * FROM TestTable; GO DROP TABLE TestTable;
TL DR: SSMS displays the data in the appropriate format for the data you have. If you do not like this, you should provide an alternative format for display for each respective column. If the problem is with your data, change the data type.
Edit: I wanted to add a little more.
This question is very similar to the question: "I would like to be able to run queries where decimal numbers return only the integer part of the value. Can this be done automatically?" Thus, a value of 9.1 will return 9, but also a value of 9.999999999 will return 9.
Now I understand that you "can" think "the numbers are not the same as the dates," but in fact they are. At the end (especially in the data), the date is just a number (hell, the datetime in SQL Server is stored as the number of days after 1900-01-01 , and the time is the decimal number of this number, so 43136.75 is actually 2018-02-07 18:00:00.000 ).
Now that we are talking in numbers, does it seem like a good idea for all your decimal places to return as their FLOOR value? I think the answer is no. Imagine doing some kind of accounting and summing up transaction values ββusing the FLOOR value. You can lose 1000 (or more) of Β£ / $ / β¬.
Think of an old example of people who stole money from payments that contained values ββless than a penny. The amount they stole was a huge amount, however, no individual theft mattered> = = $ 0.01. The same principle does apply here; accuracy is very important, and if your column has such accuracy, it should be there for some reason.
The same applies to dates. If you save time with dates, and time is not suitable for this particular request, change your request; with setting to ignore times (or decimal points) is, frankly, just a bad idea.