Re: Displaying a date with strtotime

From: Pedro Graca (hexkid_at_hotpop.com)
Date: 01/07/04


Date: 7 Jan 2004 20:32:56 GMT

Paul Beckett wrote:
> However, in another part of the webpage, I have to insert another date that
> may contain a NULL entry in the database. If I use strtotime to format this
> then it enters the current date, whereas I want it left blank.

<?php
$x=''; // with $x='2004-01-07'; works as expected

if ($x) echo date('Y-m-d', strtotime($x));
else echo 'NULL';
?>

-- 
            --= my mail box only accepts =--
            --= Content-Type: text/plain =--
            --=  Size below 10001 bytes  =--


Relevant Pages

  • Re: Removing .db file entry for PUBLIC item
    ... REM echo %%i%%j ... you're left with an invalid record entry in the DB file. ... ActiveSync in the configuration, you *always* get datasync.db ... your image and that *always* puts the database entries to start ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PHP] peer review (was php framework vs just php?)
    ... the database. ... Additional arguements may be supplied to indicate columns to ... echo "<input ... single quotes in the Type column of the ...
    (php.general)
  • Re: [PHP] peer review (was php framework vs just php?)
    ... function formCreate($database, $table, $action, $excludeCols, ... the database. ... Additional arguements may be supplied to indicate columns to ... echo "<input ...
    (php.general)
  • RE: [PHP] Re: php framework vs just php?
    ... function formCreate($database, $table, $action, $excludeCols, ... the database. ... Additional arguements may be supplied to indicate columns to ... echo "<input ...
    (php.general)
  • peer review (was php framework vs just php?)
    ... function formCreate($database, $table, $action, $excludeCols, ... the database. ... Additional arguements may be supplied to indicate columns to ... echo "<input ...
    (php.general)