Python tips
lun. 04 octobre 2010 by Martin DeudonDatetime
Get the current date/time and format it (e.g. to create a filename) :
import datetime
print(datetime.datetime.now().strftime('%d%b%Y-%Hh%M'))
>> '10Oct2018-18h01'
See Comportement de strftime()
et strptime()
for the availables directives