i resolve reading some python guide around the web in my view:
delta=datetime.timedelta(days=int(rows.Durata_prestito)) data= datetime.date(rows.Data_richiesta.year, rows.Data_richiesta.month, rows.Data_richiesta.day) fine_prestito=data+delta =fine_prestito ------------------------- rows.Durata_prestito --> my delay in number of days rows.Data_richiesta --> my start date fine_prestito --> the date of the end thanks for all the help On 3 Giu, 17:15, Iceberg <iceb...@21cn.com> wrote: > delta = date1 - date2 > > and then delta is a timedelta instance. And you reverse it by: > > date2 + delta == date1 > > Isn't it simple maths? :-) So be a python lover. It is intuitive and > it won't let you down. > > On Jun3, 11:06pm, ceriox <cer...@gmail.com> wrote: > > > i'm looking for it but timedelta retun the difference from 2 date , > > i need to add 30 days to a date > > like my example > > i have a date field and an integer field with the number of days, > > i wanna add the number of days to a data field. > > > (i'm not an expert pyton programmer) > > > On 3 Giu, 16:32, Iceberg <iceb...@21cn.com> wrote: > > > > Search doc for python built-in timedelta please. > > > > On Jun3, 10:30pm, ceriox <cer...@gmail.com> wrote: > > > > > hi, > > > > how i can increment a data field of x days? > > > > > example > > > > i have > > > > db.Prestiti.Data_richiesta=2010-06-03 16:13:14 > > > > db.Prestiti.Durata=30 > > > > > i want generate > > > > fineprestito=2010-07-03 16:13:14 > > > > > i wanna add 30 days to a data field