Datetime.timedelta object

I need to do some duration calculations in script using datetime.timedelta. One of the datetime arguments is from a sqltag with a datatype of datetime. The call is failing as it appears the sqltag does not convert to a datetime object for the calculation. I am not clear what should be done to convert the sqltag for use with a timedelta calculation.

You can probably set the data type of the tag to a string and convert back and forth.

Travis, thanks for pointing me in the right direction. It worked converting it to a datetime object using datetime.strptime.