About 674,000 results
Open links in new tab
  1. 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.

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

    557 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.

  3. python - How do I convert a datetime to date? - Stack Overflow

    Sep 18, 2010 · 14 Answer updated to Python 3.7 and more Here is how you can turn a date-and-time object (aka datetime.datetime object, the one that is stored inside models.DateTimeField django …

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

    267 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. python - How do I get file creation and modification date/times ...

    What's the best cross-platform way to get file creation and modification dates/times, that works on both Linux and Windows?

  6. Python date string to date object - Stack Overflow

    Sep 26, 2018 · How do I convert a string to a date object in python? The string would be: "24052010" (corresponding to the format: "%d%m%Y") I don't want a datetime.datetime object ...

  7. Get Yesterday's date as a string in YYYY-MM-DD format

    You just need to subtract one day from today's date. In Python datetime.timedelta object lets you create specific spans of time as a timedelta object. datetime.timedelta(1) gives you the duration of "one day" …

  8. python - Get the last day of the month - Stack Overflow

    Can Python's standard library (or dateutil if not) easily determine (i.e. one function call) the last day of a given month?

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

  10. python - How do I get the day of week given a date? - Stack Overflow

    I want to find out the following: given a date (datetime object), what is the corresponding day of the week? For instance, Sunday is the first day, Monday: second day.. and so on And then if the ...