Hi, I have a column in a SQL database which displays the date each record was created but the field not only shows the date but also the time. I want to remove the time stamp so only the date is shown in the table ( Like this 24/07/2013 not like this 24/07/2013 00:00:00). The column name I am trying to convert is called Date_Recieved.
I'm sure there is a simple solution to this problem and thank you for your help in advance.
Loading
Sunny SharmaPosted Jul 24, 2013, 5:39 AM
Change the data type of the column containing date data from "DateTime" to "Date".
Follow the syntax below:
ALTER TABLE
Hope it helps.
Cheers!
Sanjeeb LenkaPosted Jul 24, 2013, 5:37 AM
or
you can select only date part when ever needed.
ex:
SELECT CONVERT(VARCHAR(10),'2016/10/23 20:44:11',103)