I am having struggle with Python in RoboTask and formatting a date.
With method strftime() I want to get the day and month of the actual date as a decimal number.
The code ist: %-d and %-m.
With the following code in RoboTask I get an error:
Code: Select all
from datetime import datetime
print(datetime.today().strftime('%Y,%-m,%-d'))
[STDOUT] Traceback (most recent call last):
[STDOUT] File "C:\Users\robotask\AppData\Local\Temp\2\0zc6oojxecVi9TfbiuwVJVBJ47EVMAUT.py", line 3, in <module>
[STDOUT] print(datetime.today().strftime('%Y,%-m,%-d'))
[STDOUT] ValueError: Invalid format string
Exit code: 1
Am I missing something?