before you start pestering your host to modify the jdbc connection
string, try this:

SELECT customer_id, IF(ISNULL(STR_TO_DATE(LEFT(customer_dob, 10),
'%Y-%m-%d')), 'Not Defined', customer_dob) AS dob
FROM customer
WHERE 1=1

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Simon Bailey wrote:
> get them to do it, mine was also on a shared host :)
>
> On 7 Oct 2008, at 10:18, Mike Little wrote:
>
> zeroDateTimeBehavior - yes just saw this on the mysql forums. how do i  
> action this though if i am using shared host?
>
> my datasource is setup by my host??
>
>
>
>   
>> http://www.nutrixinteractive.com/blog/?p=60
>>
>> Check that out, I had a similar issue a while back and cracked it
>> using the technique I details on that post.
>>
>> On 7 Oct 2008, at 04:08, Mike Little wrote:
>>
>> hi guys,
>>
>> i have a birthdate field in mySQL that is a date field (NULL). when
>> querying the database i get...
>>
>> Value '0000-00-00' can not be represented as java.sql.Date
>>
>> i have tried changing to timestamp, but the same occurs. this happens
>> for the records with no birthdate.
>>
>> has anyone come across this before. i have tried deleting out the null
>> date but it still gives a value of '0000-00-00'.
>>
>> mike
>>     
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313524
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to