luv2kids
asked on
How to convert datetime to date
Could someone help me display the below formula as a date only:
CONVERT(varchar(10), getdate() - 4, 101)
Thanks a bunch!!
CONVERT(varchar(10), getdate() - 4, 101)
Thanks a bunch!!
ASKER
SQL Server 2000
The code as is displays: 2008-10-20 00:00:00.000
I want it to display as: 2008-10-20
The code as is displays: 2008-10-20 00:00:00.000
I want it to display as: 2008-10-20
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, what DB are you using? SQL Server? Which version?