How to convert string into datetime?
Answer / Dheeraj Sharma
To convert a string into a datetime object in Python, you can use the datetime.strptime function. This function takes a format string as an argument and converts a given date/time string according to that format.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain the difference between local and global namespaces?
What are the rules for legal python names?
What is type conversion in python?
Is python zero indexed?
What packages in the standard library, useful for data science work, do you know?
How can I make a time delay in python?
What is design pattern in python?
How can you organize your code to make it easier to change the base class?
How would you make a python script executable on unix?
What are the differences between pass and continue?
Who uses python?
What are “special” methods in python?