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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove time from date parameter

Status
Not open for further replies.
Sep 10, 2009
37
US
I have the below parameter being passed in:

Declare @rundate datetime
Set @rundate = dateadd(dd,-3,getdate())
select @rundate

It currently returns:
2009-09-11 11:07:30.487


How can I get it to return:

2009-09-11 00:00:00.000
 
Select DateAdd(Day, DateDiff(Day, 0, @rundate), 0)

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top