On Thu, May 25, 2006 at 05:04:20PM +0100, Fadhley, Salim (FID) wrote:
> That value came from sybase!
>
> Look at the function to_python in col.py - it turns whatever data format
> the DB uses to represent a date into a datetime object. It works fine as
> long as the DB ises ISOFormat. If for some reason the DB is
> misconfigured then it fails.
>
> > On Thu, May 25, 2006 at 04:41:37PM +0100, Fadhley, Salim (FID) wrote:
> > > (Pdb) value
> > > 'Jun 20 2007 12:00AM'
> > > (Pdb)
Format mismatch causes ValueError:
>>> import time
>>> time.strptime("21/12/06", "%Y-%m-%d")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/_strptime.py", line 293, in strptime
raise ValueError("time data did not match format: data=%s fmt=%s" %
ValueError: time data did not match format: data=21/12/06 fmt=%Y-%m-%d
IIRC your traceback the problem was not in value (not ValueError) but in
type (TypeError). The value is not a string. But what is it? Can you print
type(value)?
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss