views:

27

answers:

1

I used to have this code in Visual Basic:

rpt.ParameterFields.GetItemByName("RowDate").AddCurrentValue CDate("2010-03-19")

and I cannot figure out into what I have to convert date to make eatable for COM.

Any suggestions?

+1  A: 

Ok, found solution. Bellow is python equivalent:

rpt.ParameterFields.GetItemByName("RowDate").AddCurrentValue(datetime.datetime.strptime('2010-03-19', "%Y-%m-%d").date())

Approach is the same like in: http://stackoverflow.com/questions/2803852/python-date-string-to-date-object

Rafal Ziolkowski