Re: Issue with date() function...

From: Date: Fri, 10 Jun 2005 16:06:55 +0000
Subject: Re: Issue with date() function...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-39649@lists.php.net to get a copy of this message
Chase wrote:
I have a variable: $rec2day = date("Y-m-d"); that displays correctly when echoed to the screen, but when I write it to my DB, I get the mathmatical answer to the equasion (1989 (2005-06-10)). What do I need to do to correct this?? Just use $rec2day= date("Y/m/d");
You database system doesn't like using "-" as a separator in dates, thus thinking it's a minus sign and doing the appropriate math. Just use slashes and you'll probably be OK. -- Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus]

« previous php.db (#39649) next »