Mar 30, 2018
Live Spanish Cd. 3.8 out of 5 stars. 4 reviews. 6 views. A. Download mp3 free! «Última Obra» de Ángel Alonso Cueto. (2011) 5.9 out of 5 stars. 4 reviews. 31 views. Filmado por el propio director. (In English)Q:
Python CSV writer with time format
I am trying to create a csv file which has the time as the first column.
I tried following code:
import datetime
datetime.datetime.now()
datetime.datetime.strptime('2013-01-16 18:04:06', '%Y-%m-%d %H:%M:%S')
datetime.datetime.now()
It gives:
2015-12-15 12:49:40.935621
2015-12-15 12:49:40.982821
This is because now is outputting as 2015-12-15 12:49:40.935621.
Is there any way to get rid of that extra fraction?
A:
Try this:
import datetime
from datetime import datetime, timedelta
now = datetime.datetime.now()
now.strftime("%Y-%m-%d %H:%M:%S")
datetime.datetime.now()
# datetime.datetime(2015, 12, 15, 13, 53, 40)
datetime.datetime.strptime("2015-01-16 18:04:06", "%Y-%m-%d %H:%M:%S")
The invention relates to a method for operating an evaporative emission control system for an internal combustion engine, which includes an evaporative canister which stores evaporated fuel and which communicates with a conduit for recirculated exhaust gas. The invention further relates to an evaporative emission control system for an internal combustion engine.
In a known evaporative emission control system for an internal combustion engine, a canister is placed in the flow path of the recirculated exhaust gas. The canister can then be charged with evaporated fuel. The evaporated fuel can be drawn off from the canister, for example, through a suction pipe which leads to ac619d1d87
Related links:
Comments