how to remove microseconds from datetime in python

Solutions on MaxInterview for how to remove microseconds from datetime in python by the best coders in the world

showing results for - "how to remove microseconds from datetime in python"
Domenico
03 Nov 2017
1>>> datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
2'2011-11-03 18:21:26'
3