Assuming these columns are ultimately CHAR or VARCHAR on the mysql  
side, build your own Date type using TypeDecorator in conjunction with  
the String type.  MySQLdb's date/time functionality only takes effect  
for columns that are of the DATE, TIME or DATETIME columns.


On Feb 1, 2009, at 2:58 PM, rdmur...@bitdance.com wrote:

>
> I have an existing MySQL database (that I do not control) with schema
> fields defined using the 'Date' type.  The values that occur in these
> fields often have a 'day' of '00', and sometimes a month of '00', and
> sometimes the field's value is 0000-00-00.  The zeros are used to  
> indicate
> "don't know" (or, sometimes, "don't care").
>
> Since '00' is invalid for the fields in a Python DateTime, it seems  
> as though
> I can't actually use DateTime to manage these values.  My application
> should be able to use them as strings, but how do I arrange to do  
> that?
> The conversion to DateTime is presumably taking place at the DBAPI  
> level.
>
> --RDM
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to