> -----Original Message----- > From: Caleb Carvalho [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 23, 2001 2:53 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] format date > > > I am inserting into table > values('$product','$title,'$date') > > the date field gets added by default, like time stamp,
Does $date have a value at this point? What is it? > when i view the contents added to database i see date field showing > ex: > > display.php > > $product, $title, $date > ................................................ > mango good fruit Jan 1 1900 12:00:00:000AM This looks to me suspiciously like Sybase is seeing either an empty/zero value or one that it's not able to parse as a date and time. Are you *sure* that the column type you're using is supposed to automagically insert a current timestamp? If so, you might double-check your documentation to see under what circumstances it will do so...it might only do it, for example, if you insert a NULL value (which is not the same as an empty string). If not, you could try using the now() function in your insert query instead of specifying a '$date' value. --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]