Doh!
And thanks!


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Thursday, March 26, 2015 1:27 PM
To: Midrange Systems Technical Discussion
Subject: Re: TO_CHAR function

Gary,

I'm glad you were able to eventually make use of Chuck's response. I do have a small comment though (see below).

On Thu, Mar 26, 2015 at 3:07 PM, Gary Thompson <gthompson@xxxxxxxxxxx> wrote:

The time format is exactly what I want; the solution I think I'll use is:

SELECT
TO_CHAR(CURRENT TIMESTAMP, 'MM/DD/YY HH24:MI AM') FROM
SYSIBM/SYSDUMMY1

Which returns:

TO_CHAR
03/26/15 13:06 PM

Sometimes it takes a while to fully digest what Chuck is saying. When he asked if you tried 'HH24:MI AM', he was actually probing to find out if you really DID try that, because he thought maybe that was one possible reason you were "not successful" thus far.

See, you normally don't ask for both 24-hour time AND the AM/PM indicator. If you want to make it as human-friendly as possible (for Americans), you most likely want 'MM/DD/YY HH:MI AM' (12-hour time, with AM/PM indicator).

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.