php-db | 2001051
Date: 05/10/01
- Next message: Steve Brett: "[PHP-DB] Date formats from Postgres"
- Previous message: Steve Brett: "RE: [PHP-DB] No MySQL-Link resource supplied"
- Maybe in reply to: Steve Brett: "[PHP-DB] Date formats from Postgres"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
use $date=("d/m/Y",strtotime(value_from_db));
strtotime will convert a string value to a timestamp.
Steve
> -----Original Message-----
> From: Sean Weissensee [mailto:phpinfo <email protected>]
> Sent: 10 May 2001 11:13
> To: PHPDB
> Subject: [PHP-DB] Date formats from Postgres
>
>
>
> I am reading a data datatype from a PostgreSQL database,
>
> the format sohwing is 2001-01-05 for the 1st of May this year,
>
> I need this date in Australian format i.e. 01/05/2001,
>
> I tried using the string date (string format [, int timestamp])
>
> but with no success.I am not sure how to convert the database variable
> into
> a timestamp.
>
> any suggestions ?
>
> Sean Weissensee
>
> IT Manager
> Ion Solutions
>
> www.ionsol.com.au
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Steve Brett: "[PHP-DB] Date formats from Postgres"
- Previous message: Steve Brett: "RE: [PHP-DB] No MySQL-Link resource supplied"
- Maybe in reply to: Steve Brett: "[PHP-DB] Date formats from Postgres"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

