Link to home
Start Free TrialLog in
Avatar of luv2kids
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!!

Avatar of brainbolt
brainbolt

Not sure what you mean.  Can you give an example of what you are wanting to get.

BTW, what DB are you using? SQL Server? Which version?
Avatar of luv2kids

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
ASKER CERTIFIED SOLUTION
Avatar of brainbolt
brainbolt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial