I have to convert this-
['Fri May 29 20:47:53 2020']
datetime
format to date format YYYY-MM-DD
How do I achieve it in Python.
I have tried this-
import os
import time
print(time.ctime(max(os.path.getmtime(root) for root,_,_ in os.walk('/dbfs/mnt/datalake/.../'))))
Which gives a date like ['Fri May 29 20:47:53 2020'] and I have to convert it to YYYY-MM-DD.
Can I achive this by simply modifying above code or any other way please suggest.