Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python add datetime to filename

from datetime import datetime

date = datetime.now().strftime("%Y_%m_%d-%I:%M:%S_%p")
print(f"filename_{date}")

'filename_2020_08_12-03:29:22_AM'
 
PREVIOUS NEXT
Tagged: #python #add #datetime #filename
ADD COMMENT
Topic
Name
6+8 =