Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to get military time in Sybase?

Posted on 2016-07-15
3
Medium Priority
?
177 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 27

Accepted Solution

by:
wilcoxon earned 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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