Solved

How to get military time in Sybase?

Posted on 2016-07-15
3
123 Views
Last Modified: 2016-07-18
In SQL server I can get the date in military time using the following Query:
SELECT CONVERT(TIME,GETDATE())
Example of output : 22:03:15.4700000

Is there any type of similar query in SYBASE which can give me the same result?
0
Comment
Question by:brgdotnet
[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
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
wilcoxon earned 500 total points
ID: 41713797
The below will do what you want.  The format in Sybase uses : instead of . for millisecond separator.  Also, some Sybase products do not appear to include the milliseconds at all.
select convert(varchar(99), getdate(), 14)

Open in new window

0
 
LVL 2

Author Comment

by:brgdotnet
ID: 41717955
Perfect, thank you!
0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 41717956
Thank you so much.
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Invest in your employees with these five simple steps to improve employee engagement and retention.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…

759 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