About 51 results
Open links in new tab
  1. How do I get the current time in Python? - Stack Overflow

    559 How do I get the current time in Python? The time module The time module provides functions that tell us the time in "seconds since the epoch" as well as other utilities.

  2. datetime - How to get UTC time in Python? - Stack Overflow

    Apr 11, 2013 · For Python 3, use datetime.now(timezone.utc) to get a timezone-aware datetime, and use .timestamp() to convert it to a timestamp.

  3. 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. Can you try and answer to the …

  4. How do I get a string format of the current date time, in python?

    269 You can use the datetime module for working with dates and times in Python. The strftime method allows you to produce string representation of dates and times with a format you specify.

  5. 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 …

  6. How do I get the current time in milliseconds in Python?

    Jun 17, 2019 · In versions of Python after 3.7, the best answer is to use time.perf_counter_ns(). As stated in the docs: time.perf_counter() -> float Return the value (in fractional seconds) of a …

  7. In Python, how to display current time in readable format

    Oct 18, 2010 · How can I display the current time as: 12:18PM EST on Oct 18, 2010 in Python. Thanks.

  8. How to get the current time with python - Stack Overflow

    Oct 13, 2020 · How do you get the current time in python? I have seen people get the date and time, but I only want the time as a string. For example, if the current time was 8:30, the command should …

  9. How to get current time in python and break up into year, month, day ...

    May 6, 2015 · I would like to get the current time in Python and assign them into variables like year, month, day, hour, minute. How can this be done in Python 2.7?

  10. How to create a file name with the current date & time in Python?

    While not using datetime, this solves your problem (answers your question) of getting a string with the current time and date format you specify: