Jairo Eligio Peñaló Sánchez
Newbie
Points: 1
More actions
October 1, 2004 at 11:51 am
#162377
I'm looking for method to find only date in a DateTime field. For example, i have this field with this value <'09/09/2004 10:30:25.525'>. I only want to find the date that the field has <'09/09/2004'>. How can i do it?
Aaron Templeton
SSCarpal Tunnel
Points: 4655
October 1, 2004 at 12:48 pm
#525082
CONVERT( varchar, MyDateColumn, 101 )
If you want it in a datetime field just convert back again. This results in a zero time which is midnight.
CONVERT( datetime, CONVERT( varchar, MyDateColumn, 101 ) )
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply