I want to put the date and time into a file. Below is what I have tried.
>>> test_time = open('test.time', 'w')
>>> test_time.write('today is')
>>> test_time = open('test.time', 'a')
>>> today = datetime.date.today()
>>> print today
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 1 must be string or read-only character buffer, not datetime.date
My question is :
In above case, how to put the value of datetime.date.today() into the file ?
Thank you for your help !!