Tuesday, February 14, 2012

Date and Time Output

I have a SQL statement creating an output of date and time, I would like to
show the time in military. The output I receive is in AM/PM.
How to generate the a military display?
Thank you
See Books Online "CAST and CONVERT".
Mike
"robert_at_cbb" wrote:

> I have a SQL statement creating an output of date and time, I would like to
> show the time in military. The output I receive is in AM/PM.
> How to generate the a military display?
> Thank you
|||I did look in books online, but I still get the AM/PM. Could you provide an
example i might be able to use.
"Mike" wrote:
[vbcol=seagreen]
> See Books Online "CAST and CONVERT".
> Mike
> "robert_at_cbb" wrote:
|||select convert (char (30), getdate(), 14)
Styles 13, 14, 20 and 21 all return 24h time with various formats for the
date portion. The trick is getting the length for char() long enough (too
short will truncate the results) and the correct style number.
Mike
"robert_at_cbb" wrote:
[vbcol=seagreen]
> I did look in books online, but I still get the AM/PM. Could you provide an
> example i might be able to use.
> "Mike" wrote:
|||http://www.aspfaq.com/2464
http://www.aspfaq.com/
(Reverse address to reply.)
"robert_at_cbb" <robertatcbb@.discussions.microsoft.com> wrote in message
news:531FFB92-520B-4A0A-9A6E-154096346D6A@.microsoft.com...
> I have a SQL statement creating an output of date and time, I would like
to
> show the time in military. The output I receive is in AM/PM.
> How to generate the a military display?
> Thank you

No comments:

Post a Comment