your date can be null, no problem, you just need to incorporate some
flow control logic into your query to deal with null dates.

simple example would be:
SELECT ..., IFNULL(datecolumn, 'not available') AS datecolumn, ...

then at output you can do:
<cfoutput query="...">
....
<cfif datecolumn neq 'not available'>#dateformat(datecolumn,
'yourmask')#<cfelse>#datecolumn#</cfif>

hth

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



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:313505
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