Solved

How to get military time in Sybase?

Posted on 2016-07-15
3
95 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.

856 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