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 ("<INPUT TYPE= \"text\" NAME=\"time\" VALUE= \"$time\"><BR>\n");
and
print ("<INPUT TYPE= \"text\" NAME=\"time\">\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
>