Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

just date part

Status
Not open for further replies.

Ginka

Programmer
Mar 18, 2005
54
MX
I'm comparing dates, but the values stored in the DB contains the time part too.

I just need for example if I use the following code

SELECT GETDATE()
I get
2006-04-19 12:51:01.827

I just need the date

Is there any function o way to get just the date???




Deeply I need to do something like this

SELECT *
FROM MyTable
WHERE Date = @MyDate

@MyDate contains just a date, but when I receive the value it contains the date and time, so it is almost impossible to get coincidences
 
yeah that works, but I thougth would be another way to do that.

Anyway

thanks SQLDenis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top