From: | "Gary Hoffman" <ghoffman(at)ucsd(dot)edu> |
---|---|
To: | "pgsql-php(at)postgresql(dot)org" <pgsql-php(at)postgresql(dot)org> |
Cc: | enzovenegas(at)mixmail(dot)com |
Subject: | Re: format query |
Date: | 2005-03-17 18:30:38 |
Message-ID: | fc.00249f0e0138847d3b9aca00c0805dc7.1388627@irpsmail.ucsd.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
enzovenegas(at)mixmail(dot)com writes:
>I need to prove to be alone the date and not the hour of a table with
>format
>timestamp.
>
>please.
Enzo,
I've used two different methods:
-The SQL string function substr(string) gets the parts of the result that
you need, where the date is cast as text.
-The PostgreSql SQL function epoch(timestamp) in your query gets the
timestamp as a numeric that the PHP function date() can format however you
want.
Good luck,
Gary
**************************************************************************
* Gary B. Hoffman, Computing Services Manager e-mail: ghoffman(at)ucsd(dot)edu *
* Graduate School of International Relations and Pacific Studies (IR/PS) *
* University of California, San Diego (UCSD) voice: (858) 534-1989 *
* 9500 Gilman Dr. MC 0519 fax: (858) 534-3939 *
* La Jolla, CA 92093-0519 USA web: http://irps.ucsd.edu/ *
**************************************************************************
From | Date | Subject | |
---|---|---|---|
Next Message | enzo venegas palacios | 2005-03-17 23:35:30 | a new question |
Previous Message | enzo venegas palacios | 2005-03-17 15:58:35 | Re: format query |