simple way to drop milliseconds from python …
https://stackoverflow.com/questions/31487732/simple-way-to-drop-milliseconds-from-python-datetime-datetime-object
My colleague needs me to drop the milliseconds from my python timestamp objects in order to comply with the old POSIX (IEEE Std 1003.1-1988) standard. The tortured route that accomplishes this task for me is as follows: datetime.datetime.strptime (datetime.datetime.today ().strftime ("%Y-%m-%d %H:%M:%S"),"%Y-%m-%d %H:%M:%S") Is there a simpler ... Reviews: 2
Reviews: 2
DA: 3 PA: 55 MOZ Rank: 73