hi
my db stores date in datetime format where time is also get entered now
i want only date from db so how can i extract only date so that i can match search criteria
so which method should i use
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
divyaPosted Jun 19, 2012, 6:29 AM
By this query you can get date without time..
Select convert(varchar(50),DateField,105) as date from MyTable;
here MyTable is the table name and DateField is the column name..
for more details please refer this link..
http://www.sqlusa.com/bestpractices/datetimeconversion/
http://www.mssqltips.com/sqlservertip/1145/date-and-time-conversions-using-sql-server/
hope this will help you...