Re: Time Formatting

Поиск
Список
Период
Сортировка
Искать
От
hodges@xprt.net
Тема
Re: Time Formatting
Дата
в 23:25:15
Msg-id
3CDADC59.2889.F1653F@localhost
Ответ на
Re: Time Formatting (Larry Rosenman)
Список
Дерево обсуждения
Re: Date Formatting Richard A Lough <ralough.ced@dnet.co.uk>
Time Formatting hodges@xprt.net
Re: Time Formatting Larry Rosenman <ler@lerctr.org>
Re: Time Formatting hodges@xprt.net
Re: Time Formatting Andrew McMillan <andrew@catalyst.net.nz>
Re: Time Formatting hodges@xprt.net
Re: Time Formatting Andrew McMillan <andrew@catalyst.net.nz>
Re: Time Formatting hodges@xprt.net
I have 3 queries and some php to run them.  What I need is
to display the time in a HH:MM am format.  Doesn't need to
be stored that way in the table?


These two add or update records:

insert into feasts (timestamp, date, time, address, direction, 
host, phone)
values ('current_timestamp', '$date', '$time','$addr',
'$directions','$host','$phone');

update feasts set date='$date', time='$time', host='$host',
phone='$phon', address=$addr','direction='$directions'
where feast_id='$feast_id';


These retrieve and display records:

select * from feasts;

$time = $result->fields[3];

and in a form,
print ("
\n"); and print ("\n"); So I am not sure how to do this. Thanks, Tom On 9 May 2002 at 20:55, Larry Rosenman wrote: > On Thu, 2002-05-09 at 20:37, hodges@xprt.net wrote: > > Is there a builtin function in Postgres to display the > > time as XX:XX am or XX:XX pm? > > > look at the to_char function on > http://www.lerctr.org/postgresql/functions-formatting.html > > (this is my copy of the docs). > > > > Cheers, Tom Hodges > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 3: if posting/reading through Usenet, please send an appropriate > > subscribe-nomail command to majordomo@postgresql.org so that your > > message can get through to the mailing list cleanly > > > -- > Larry Rosenman http://www.lerctr.org/~ler > Phone: +1 972-414-9812 E-Mail: ler@lerctr.org > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
В списке pgsql-novice по дате отправления
От: Larry Rosenman
Дата:
Сообщение: Re: Time Formatting
От: Oliver Elphick
Дата:
FAQ