Re: subtract dates with time module

2008-04-02 Thread barronmo
Thanks for the help everyone. I ended up with the following: def OBweeks(ptID): qry = 'SELECT short_des FROM problems WHERE patient_ID = %s;' % (ptID) results = EMR_utilities.getAllData(qry) for items in results: r = re.search('\d\d\d\d-\d\d-\d\d', str(items))

Re: subtract dates with time module

2008-03-27 Thread John Machin
barronmo wrote: > I'm trying to get the difference in dates using the time module rather > than datetime because I need to use strptime() to convert a date and > then find out how many weeks and days until that date. datetime.datetime.strptime was introduced in Python 2.5; what version are you u

Re: subtract dates with time module

2008-03-27 Thread Diez B. Roggisch
barronmo wrote: > I'm trying to get the difference in dates using the time module rather > than datetime because I need to use strptime() to convert a date and > then find out how many weeks and days until that date. I'm a beginner > so any help would be appreciated. Here is the code: Use strpt

Re: subtract dates with time module

2008-03-26 Thread Gabriel Genellina
En Wed, 26 Mar 2008 20:47:45 -0300, barronmo <[EMAIL PROTECTED]> escribió: > I'm trying to get the difference in dates using the time module rather > than datetime because I need to use strptime() to convert a date and > then find out how many weeks and days until that date. I'm a beginner > so a

subtract dates with time module

2008-03-26 Thread barronmo
I'm trying to get the difference in dates using the time module rather than datetime because I need to use strptime() to convert a date and then find out how many weeks and days until that date. I'm a beginner so any help would be appreciated. Here is the code: def OBweeks(ptID): qry = 'SEL