[PHP] Timestamps and strftime

2009-06-04 Thread John Comerford
Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows: foreach ($stmt-fetchall(PDO::FETCH_ASSOC) as $row) { echo

RE: [PHP] Timestamps and strftime

2009-06-04 Thread Mayer, Jonathan
Off the top of my head, would strtotime work? ie strftime(%j,strtotime($row['UpdateDate'])) -Original Message- From: John Comerford [mailto:jo...@optionsystems.com.au] Sent: 04 June 2009 07:10 To: php-general@lists.php.net Subject: [PHP] Timestamps and strftime Hi, I am having

Re: [PHP] Timestamps and strftime

2009-06-04 Thread John Comerford
2009 07:10 To: php-general@lists.php.net Subject: [PHP] Timestamps and strftime Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows