SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 gettime from sql server as a string
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pelegk2
Aged Yak Warrior

Israel
723 Posts

Posted - 11/29/2006 :  05:22:01  Show Profile  Visit pelegk2's Homepage  Send pelegk2 an ICQ Message  Reply with Quote
how can i get the timefrom sqlserver as a string?
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 11/29/2006 :  05:40:40  Show Profile  Visit SwePeso's Homepage  Reply with Quote
SELECT CONVERT(VARCHAR, GETDATE(), xxx)

For values of xxx, read about CONVERT function in Books Online.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22777 Posts

Posted - 11/29/2006 :  09:39:43  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
If you use front end application like Vb, you can make use of Format function

Format(date,"HH:MM:SS")

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000