Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Date and Time Module in Python | Edureka

333 Aufrufe

Veröffentlicht am

YouTube Link: https://youtu.be/mHezNgNBnuA
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Date and Time in Python' will train you to use the datetime and time modules to fetch, set and modify date and time in python.
Below are the topics covered in this PPT:
The time module
Built-in functions
Examples
The datetime module
Built-in functions
Examples

Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Date and Time Module in Python | Edureka

  1. 1. ➢ The time module ➢ Built-in functions ➢ Examples ➢ Built-in functions ➢ Examples ➢ The datetime module www.edureka.co/python
  2. 2. www.edureka.co/python
  3. 3. www.edureka.co/python Function Description time() Returns the number of seconds ctime() Returns the current date and time sleep() Stops execution of a thread for the given duration localtime() Returns the date and time in time.struct_time format gmtime() Returns time.struct_time in UTC format mktime() Returns the seconds passed since epoch pas output asctime() Returns a string representing the same Begins recording time from the epoch that begins at 00:00:00, 1st Jan 1970
  4. 4. www.edureka.co/python Attribute Value tm_year 0000, .., 2019, …, 9999 tm_mon 1-12 tm_mday 1-31 tm_hour 0-23 tm_min 0-59 tm_sec 0-61 tm_wday 0-6, Monday as 0 tm_yday 1-366 tm_isdst 0, 1, -1 Attributes of struct_time class
  5. 5. www.edureka.co/python
  6. 6. www.edureka.co/python Function Description datetime() Datetime constructor datetime.today() Returns the current date and time datetime.now() Returns the current date and time date() Takes year, month and day as parameter and creates the corresponding date time() Takes hour, min, sec, microseconds and tzinfo as parameter and creates the corresponding date datetime.fromstamp() Converts seconds to return the corresponding date and time timedelta() It is the difference between different dates or times (Duration)
  7. 7. www.edureka.co/python

×