Select specific hour in a day regardles of the current time

Greetings experts,
I want to get a query that shows me current date with 9:00 am time ( regardless of the time of running the query ) .. I mean I want to show the result as ( 2010-03-23 09:00:00 ) regardless of the time that I run the query.
Select {fn now()}  will return the current date and time but I want it to show me the current date with 09:00:00 all the time.
The aim of this query is to calculate minutes passed from 9:00 am to the tmie we run the query .. I mean I want to get a result which says ( 230 minutes or 320 minutes passed from Today's working hours.
Thanks in advance for your supports
Regards
npiutAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wittysloganCommented:
declare @date datetime
select @date=getdate()
SELECT @Date = CONVERT(varChar(40),@date,107)
      SELECT @Date = @Date + ' 09:00:00'
print @Date
0
wittysloganCommented:
and this should work ou the minutes:
declare @date datetime
declare @diff int
select @date=getdate()
SELECT @Date = CONVERT(varChar(40),@date,107)
      SELECT @Date = @Date + ' 09:00:00'
print @Date

select @diff=datediff(mi,@date,getdate())
print @diff
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VacheronCommented:
If you want to use it in SQL query please try this:

select datediff(mi,convert(varchar(10),getdate(),101)+' 9:00:00',getdate())  
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

wittysloganCommented:
that's very nice.  I'd use that instead.
0
SharathData EngineerCommented:
try this
SELECT Dateadd(HOUR,9,Dateadd(dd,0,Datediff(dd,0,Convert(DATETIME,Getdate()))))

Open in new window

0
npiutAuthor Commented:
THank you very much guys
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.