Since type Datetime in SQL Server 2005 consists of both date and time, thus sometimes when we want only date we need to do something. This is one of the ways to convert datetime.
[SQL]
CONVERT(varchar, CONVERT(datetime, convert (datetime, convert (varchar, datecol, 101), 101) ), 100)
No comments:
Post a Comment