On Thu, Oct 03, 2002 at 10:46:19AM -0400, Thomas Good wrote:
>
> SELECT TO_CHAR(SYSDATE,'HH:MI AM') FROM DUAL; -- Oracle
> SELECT TIME_FORMAT(current_time,'%l:%i %p'); -- MySQL
SELECT TO_CHAR(now(),'HH:MI AM'); -- PostgreSQL
:-)
--
Karel Zak <[EMAIL PROTECTED]>
h
On Thu, 3 Oct 2002, Josh Berkus wrote:
> Thomas,
>
> > SELECT TO_CHAR(SYSDATE,'HH:MI AM') FROM DUAL; -- Oracle
> > SELECT TIME_FORMAT(current_time,'%l:%i %p'); -- MySQL
> >
> > Returned: 10:58 AM
> >
> > I've found lpad(current_time,5); which gets me 1/3 of the way.
> > Is there a function I h
On 7.2.2, you can use
select to_char(now(), 'HH12:MI AM');
(using current_time raises an error, but now() works fine).
Charlie
Josh Berkus wrote:
>Thomas,
>
>
>
>>SELECT TO_CHAR(SYSDATE,'HH:MI AM') FROM DUAL; -- Oracle
>>SELECT TIME_FORMAT(current_time,'%l:%i %p'); -- MySQL
>>
>>Returned:
SELECT to_char(now(), 'HH24:MI AM');
(in 7.2.1)
==
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:+30-10-8981112
fax:+30-10-8981877
email: [EMAIL PROTECTED]
[E
Thomas,
> SELECT TO_CHAR(SYSDATE,'HH:MI AM') FROM DUAL; -- Oracle
> SELECT TIME_FORMAT(current_time,'%l:%i %p'); -- MySQL
>
> Returned: 10:58 AM
>
> I've found lpad(current_time,5); which gets me 1/3 of the way.
> Is there a function I haven't found?
Um, what's wrong with:
SELECT to_char(cu
Hi.
Anyone have any tips on how I can approximate the following:
SELECT TO_CHAR(SYSDATE,'HH:MI AM') FROM DUAL; -- Oracle
SELECT TIME_FORMAT(current_time,'%l:%i %p'); -- MySQL
Returned: 10:58 AM
I've found lpad(current_time,5); which gets me 1/3 of the way.
Is there a function I haven't foun