List:General Discussion« Previous MessageNext Message »
From:Gaëtan Lepargneul Date:November 17 2000 3:18pm
Subject:FW: date and servlet
View as plain text  

hum... I don't pass a string but a DATE type as you said and it doesn't
work....
any idea??

thanks for your help 

-----Original Message-----
From: Pat Sherrill [mailto:patrick@stripped]
Sent: Friday, November 17, 2000 3:56 PM
To: Gaëtan Lepargneul; mysql@stripped
Subject: Re: date and servlet


Check the format of the string you are passing as the date.  If the string
is not in an appropriate format (i.e. a format as indicated in the MySQL
Manual sec 7.2.3), MySQL will set the date to '0000-00-00'.  I always format
the date string I pass to MySQL as 'yyyy-mm-dd'. If you are passing numbers
as opposed to strings they must be in the format yyyymmdd.

I recommend passing strings to DATE types to avoid any problems arising from
platform issues et al...

I hope this helps....

Pat...
patrick@stripped

----- Original Message -----
From: "Gaëtan Lepargneul" <Gaetan.Lepargneul@stripped>
To: <mysql@stripped>
Sent: Friday, November 17, 2000 9:22 AM
Subject: date and servlet


> hi everybody,
>
> In a table I have a date type field and I want to update this field
through
> a servlet but if I give directly my Date object to the field it  doesn't
> work...the date stored is always 0000-00-00...
> I hope it was clear...
>
> if you could help me,
> regards,
> gaetan
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/documentation/manual.php" before
> posting. To request this thread, e-mail mysql-thread56637@stripped
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-patrick=coconet.com@stripped>
>
> If you have a broken mail client that cannot send a message to
> the above address (Microsoft Outlook), you can use:
>     http://lists.mysql.com/php/unsubscribe.php
>
Thread
FW: date and servletGaëtan Lepargneul17 Nov
  • Re: date and servletPat Sherrill18 Nov