简体   繁体   中英

What is the correct format for this time data to use in a python script?

"01.08.2017 00:00:00.000"

What is the correct way to define this data set in a python script is it '%d.%m.%Y %H:%M:%S.%f'

Thanks for your help. Still learning

The format that you have specified is like this:

In : datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')
Out: '19.10.2017 20:04:55.947244'

Here you can find a list of all allowed directives.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM