From: | Thomas Good <tomg(at)sqlclinic(dot)net> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Postgres SQL <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: Formatting current_time output |
Date: | 2002-10-03 15:10:03 |
Message-ID: | Pine.LNX.4.33.0210031103540.11713-100000@q8.nrnet.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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 haven't found?
>
> Um, what's wrong with:
> SELECT to_char(current_time, 'HH12:MI AM');
Not a thing! Except that I think you mean 'current_date'. ;-)
Cheers Josh (and thanks alot)...
BTW the JOIN you sent the other day worked fine.
Thanks again,
-----------------------------------------------------------------------
Thomas Good e-mail: tomg(at)sqlclinic(dot)net
Programmer/Analyst phone: (+1) 718.818.5528
Residential Services fax: (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY mobile: (+1) 917.282.7359
-- --
SQL Clinic - An Open Source Clinical Record www.sqlclinic.net
------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Charles H. Woloszynski | 2002-10-03 15:22:48 | Re: Formatting current_time output |
Previous Message | Roberto Mello | 2002-10-03 15:09:27 | epoch to date |