Link to home
Start Free TrialLog in
Avatar of Leo Torres
Leo TorresFlag for United States of America

asked on

TSQL Date Format Query Syntax



This I am sure its easy but I can find it online

I need to return a date with time as 0000 or no time

But I dont wat to use the convert because I dont what to make it a string

I like to keep it as a  date


This 2011-02-27 10:52:46.310

would return 2011-02-27 00:00:00.000
or 2011-02-27

what to keep as date not using convert


Avatar of bizbiz20032003
bizbiz20032003

Function Date(xxxxx) ?
Avatar of Guy Hengel [angelIII / a3]
cast ( yourfield as date)
ASKER CERTIFIED SOLUTION
Avatar of derekkromm
derekkromm
Flag of United States of America image

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
Avatar of Leo Torres

ASKER

thank you that was exactly what I am looking for