I have a list of dates defined in the Date format of quantlib. How can I convert these into datetime format. The reason I am asking is, that I would like to plot it and I received the follwoing error:
TypeError: float() argument must be a string or a number, not 'Date'
when doing the following:
plt.plot(dates,rates, linewidth=2.0) # Without date plotting works out.
dates looks like the following:
[
Date(11,12,2012),
Date(12,12,2012),
Date(13,12,2012),
Date(14,12,2012),
Date(15,12,2012),
Date(16,12,2012),
Date(17,12,2012),
Date(18,12,2012),
Date(19,12,2012),
Date(20,12,2012)
]