About 1,550,000 results
Open links in new tab
  1. python - How to print a date in a regular format? - Stack Overflow

    Oct 7, 2016 · In Python you can format a datetime using the strftime() method from the date, time and datetime classes in the datetime module. In your specific case, you are using the date class from …

  2. How do I turn a python datetime into a string, with readable format …

    The datetime class has a method strftime. The Python docs documents the different formats it accepts: strftime () and strptime () Behavior For this specific example, it would look something like:

  3. Date Time Formats in Python - Stack Overflow

    Jul 10, 2013 · What are these date-time formats? I need to convert them to the same format, to check if they are the same. These are just two coming from a separate data source, so I need to find a way to …

  4. How do I get the current time in Python? - Stack Overflow

    Use the below sample script to get the current date and time in a Python script and print results on the screen. Create file getDateTime1.py with the below content.

  5. Getting today's date in YYYY-MM-DD in Python? - Stack Overflow

    Try not to use python built in functions and variables as local variables (ex: today, year, day). Also, the request from the user is to get today's date in YYYY-MM-DD format.

  6. python - Parse date string and change format - Stack Overflow

    Feb 15, 2010 · I have a date string with the format 'Mon Feb 15 2010'. I want to change the format to '15/02/2010'. How can I do this?

  7. datetime - ISO time (ISO 8601) in Python - Stack Overflow

    In Python, I would like to take its creation time, and convert it to an ISO time (ISO 8601) string while preserving the fact that it was created in the Eastern Time Zone (ET). How do I take the file's ctime …

  8. Python 3 How to format to yyyy-mm-ddThh:mm:ssZ - Stack Overflow

    Mar 6, 2019 · I'm new to Python and I cannot for the life of me find my specific answer online. I need to format a timestamp to this exact format to include 'T', 'Z' and no sub or miliseconds like this yyyy-mm …

  9. string - Formatting datetime in python - Stack Overflow

    Nov 6, 2014 · It's more concise to use datetime.strftime, and that's also considered the standard way of formatting dates in Python. It also gives you more flexibility if you want to change the time format …

  10. User-friendly time format in Python? - Stack Overflow

    Python: I need to show file modification times in the "1 day ago", "two hours ago", format. Is there something ready to do that? It should be in English.