On 11/05/2012 10:55, Nikhil Verma wrote:
Hi AllI have a list like this :- [ ('7 May monday AM Neuropancreatic'), ('8 May tuesday PM Cardiovascular')] how can i increment date in the above list for the next months on weekly basis ? [ ('7 May monday AM Neuropancreatic'),('14May monday AM Neuropancreatic')('21 May monday AM Neuropancreatic')('28 May monday AM Neuropancreatic'), ('8 May tuesday PM Cardiovascular'),('15 May monday AM Neuropancreatic'),('22 May monday AM Neuropancreatic'),('29 May monday AM Neuropancreatic')] Thanks
See http://docs.python.org/library/time.html#time.strptime and it's cousin strftime, and http://docs.python.org/library/datetime.html#module-datetime date and timedelta types.
-- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list
