DateTime Manipulations with Python
Last Updated on July 20, 2023 by Editorial Team
Author(s): Bindhu Balu
Originally published on Towards AI.
In Python, date, time, and DateTime classes provide a number of functions to deal with dates, times, and time intervals. Date and DateTime are an object in Python, so when you manipulate them, you are actually manipulating objects and not string or timestamps. Whenever you manipulate dates or times, you need to import DateTime function.
The DateTime classes in Python are categorized mainly into 5 classes.
date β Manipulate just date ( Month, day, year)time β Time independent of the day (Hour, minute, second, microsecond)DateTime β Combination of time and date (Month, day, year, hour, second, microsecond)time delta β A duration of… Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI