Solved

SQL Server 2005 Military Time

Posted on 2012-12-21
4
605 Views
Last Modified: 2012-12-21
Can anyone tell me how to do military time in sql server 2005 all columns are date time
0
Comment
Question by:Charles Baldo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 38714443
SELECT CONVERT(CHAR(8),GETDATE(),14) -- hh:mm:ss

SELECT CONVERT(CHAR(30),GETDATE(),14) -- hh:mm:ss:miliseconds.
0
 
LVL 15

Expert Comment

by:tim_cs
ID: 38714447
Try convert.  http://msdn.microsoft.com/en-us/library/ms187928.aspx

CONVERT(varchar(12), DateField, 114)
0
 
LVL 22

Expert Comment

by:Steve Wales
ID: 38714449
All the various date options for CONVERT for date are here:

http://msdn.microsoft.com/en-us/library/ms187928.aspx

Take your pick for the one you need.
0
 

Author Closing Comment

by:Charles Baldo
ID: 38714462
Thanks
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question