Formatting current_time output

Поиск
Список
Период
Сортировка
От Thomas Good
Тема Formatting current_time output
Дата
Msg-id Pine.LNX.4.33.0210031041060.11566-100000@q8.nrnet.org
обсуждение исходный текст
Ответы Re: Formatting current_time output
Re: Formatting current_time output
Список pgsql-sql
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 found?

TIA
-----------------------------------------------------------------------
Thomas Good                                  e-mail: tomg@sqlclinic.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
------------------------------------------------------------------------




В списке pgsql-sql по дате отправления:

Предыдущее
От: Thrasher
Дата:
Сообщение: Re: Updating from select
Следующее
От: Roberto Mello
Дата:
Сообщение: epoch to date