December 17, 2003 at 12:16 pm
I am trying to get the time value in a 'hh:mm:ss am/pm' format from the getdate() function, can anyone please tell me how to achieve that? Many thanks!
December 17, 2003 at 1:11 pm
Might try something like this:
select substring(convert(char(30),getdate(),109),13,8) +
' ' + substring(convert(char(30),getdate(),109),25,2)
Gregory A. Larsen, DBA
Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here: http:www.sqlservercentral.com/bestof/purchase.asp
Need SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
December 17, 2003 at 2:46 pm
Looks like this got posted twice. Continue responses in this thread so we can keep everything together:
K. Brian Kelley, GSEC
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
K. Brian Kelley
@kbriankelley
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply