- Get link
- Other Apps
- Get link
- Other Apps
Timedelta:
The Timedelta() class:
- The timedelta() class is used to represent the difference between two datetime objects.- The timedelta() class is also used to add or subtract days, hours, minutes, seconds, and microseconds in a datetime object.
- The years and months are NOT changed by timedelta() class.
- In the below codes, the * (sign in import) means calling all classes of the datetime module at one time.
- In the below codes, we add one second by using the timedelta() class.
- In the below codes, we add one second by using the timedelta() class.
- In the below codes, we add one day and one second by using the timedelta() class.
- Get link
- Other Apps
Comments
Post a Comment