Re: Re: Date Function - Empty Value
| From: | Mark Pecaut | Date: | Thu, 20 May 2004 17:35:43 +0000 |
| Subject: | Re: Re: Date Function - Empty Value | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186610@lists.php.net to get a copy of this message | ||
On Thu, May 20, 2004 at 12:28:00PM -0400, Gabe wrote:
> >>>>>>I'm trying to store a date in a date/time field using the short
> >>>>>>date
> >>>>>>format ( m/d/yyyy ). For some reason it won't let me post an
> >>>>>>empty
> >>>>>>value to that field in the DB. I've tried using empty quotes (
> >>>>>>"" )
>
> I'm using Microsoft Access for my database not MySQL. Does that change
> what I need to do?
Access delimits dates with '#' hash marks. Try something like:
UPDATE tablename SET date_field=#9/30/2003# WHERE foo='bar';
or
UPDATE tablename SET date_field=NULL WHERE foo='bar';
if you want to make that field null. If it complains when you try to
set it NULL and you want it to be null, put 'No' for 'Required' for that
field in Design View.
-Mark