Tag strptime

[Solved] strptime returning NA values [closed]

The format argument you give should reflect the format that the data is currently in, not the format that you want to convert it to, so you would have to set format = “%Y-%m-%d”. Read the documentation on strptime again…

[Solved] Datetime – Strftime and Strptime

A possible solution is to use str.lstrip Ex: import datetime Date = datetime.datetime.today().strftime(“%d %B %Y”) print(Date.lstrip(“0”)) Output: 9 May 2018 0 solved Datetime – Strftime and Strptime