Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lauramayer
Posting Yak Master
152 Posts |
Posted - 2005-03-14 : 10:40:16
|
| Morning,I have a relatively easy question that keeps eluding me. I need to get a peice of time What I have is:select CONVERT(char(30), CURRENT_TIMESTAMP )as timewhich returns Mar 14 2005 10:34AM I would like it to return Mar 14 2005 10:00AM like the round fuction does:select ROUND(CONVERT(char(30), CURRENT_TIMESTAMP)),2)as timebut I can't make it do what I want. Any thoughts would be appreciated.ThanksLaura |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-14 : 10:48:02
|
like so:SELECT GetDate(), convert( varchar(30), DATEADD(hh, DATEDIFF(hh, 0, GetDate()), 0) )Go with the flow & have fun! Else fight the flow |
 |
|
|
lauramayer
Posting Yak Master
152 Posts |
Posted - 2005-03-14 : 10:53:24
|
| Bloody brilliant :) Thanks so muchLaura |
 |
|
|
|
|
|