user2829148
user2829148

Reputation: 43

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

Upvotes: 2

Views: 49

Answers (1)

sinned
sinned

Reputation: 738

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.

Upvotes: 2

Related Questions