Time Functions – Set 2:

In Python, we can perform date manipulation using the “datetime” module for Data Science and by “date” class.

Operations on date:

  1. MINYEAR – It is there to display the minimum year, which we can represent using date class.
  2. MAXYEAR – It is there to display the maximum year, which we can represent using class.datetime python data science
  3. date(yyyy-mm-dd) – When this function is called, it returns a string in the order of year, months and date.
  4. today() – It returns the present date in the format of yyyy-mm-dd.
  5. fromtimestamp(sec) – This function returns the date which we calculate from the seconds which are elapse as epoch which is mentione in arguments.
  6. min() – This function returns the minimum date, which we can represent as date class.
  7. max() – This function returns the maximum date which we can represent as date class.

 

So, to learn more about datetime functions in python for data science, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.