[Zope-DB] Problem with datetime

charlie@begeistert.org charlie@begeistert.org
Mon, 19 Aug 2002 16:23:16 +0000

Dear list,

this is my first post to this list. It's been quiet since I joined but I 
hope there's someone listening.

I'm having trouble inserting a datetime object into my SQL-database. I 
don't get any error messages but nothing is inserted apparently.

I call my ZSQL from within a python script and have tried different ways of=
formatting the date with the same lack of success.

#birthdate =3D DateTime( '%d/%d/%d'  % (int(request['year']), 
int(request['month']), int(request['day'])) ).Date()
birthdate =3D "/".join([year, month, day])
print birthdate
t_person['birthdate'] =3D birthdate

update_person looks like this:
update person
name =3D <dtml-sqlvar name type=3D"string">,
vorname =3D <dtml-sqlvar vorname type=3D"string">,
id_anrede =3D <dtml-sqlvar anrede type=3D"int">,
id_titel =3D <dtml-sqlvar titel type=3D"int">,
geburt =3D <dtml-var birthdate>
where id_person =3D <dtml-sqlvar id_person type=3D"int"

Any ideas?


PS. I've started using Adrian Hungate's DataQueryKit - it helps a load 
setting up queries - anyone else using?
Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226