Hey all,
 I have an application which needs to support 'incomplete' dates -
those where the month or day are unknown (or even the year, why not?).
 MySQL supports doing this in it's Date column type (I don't know
about other DBs), so for example I can have a date field containing:
"1998-10-00".
 Unfortunately, python/SA always attempts to read date columns into
the datetime.date type, which doesn't support incomplete dates, and
you end up with None.
 I've tried overriding the column definition (I use reflection) in the
SA table declaration, to make it a String, but it is still read from
the database into a datetime.date object (which SA then tries to
decode() unsuccessfully). I guess this means that it's outside of SA
that the column is made a datetime.date?

 As I haven't yet found any other way around this, my only recourse
seems to be to split the date columns into three, which just feels
wrong to me. Can anyone suggest a more elegant solution?

 Takk,
 - Mel C


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to