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

System Time

Status
Not open for further replies.

HLPCH

IS-IT--Management
Jul 12, 2004
47
US
Hi, Could someone tell me what function I need to use to get the system Time?

I know that the Getdate() only gives the currentdate plus time. But I only need the time portion in the format hours:minutes:seconds

Thanks

CS
 
There is no time type in SQL Server - you must use char/varchar:

select convert(varchar(8), getdate(), 108)

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Try this
SELECT CONVERT(CHAR(8), GETDATE(), 108)

Dr.Sql
Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top