banner

© 2004-19 ict4u.net

Python Dates
Code examples to help you understand the date and time functions available in Python
Method Description
Timer Setup a simple execution timer
Execution Time Formatted Time a piece of code with formatted output
Get current date and time Return date and time into separate variables for use in code. Shows how to re-format date output.
Convert string to time Input a text string and convert to date. Shows how to re-format output
Users age Calculate the users age from an input date string
Date and Time Formatting text strings as standard date-time