Re: Re: Date Function - Empty Value

From: Date: Thu, 20 May 2004 19:11:08 +0000
Subject: Re: Re: Date Function - Empty Value
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-186620@lists.php.net to get a copy of this message
Mark Pecaut wrote:
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
I'll give those a try. Thanks for the tips.

« previous php.general (#186620) next »