Top "Python-datetime" questions

Python's built-in datetime module provides classes for manipulating dates and times in both simple and complex ways.

How do I round datetime column to nearest quarter hour

I have loaded a data file into a Python pandas dataframe. I has a datetime column of the format 2015-07…

python datetime pandas python-datetime
datetime.fromtimestamp vs datetime.utcfromtimestamp, which one is safer to use?

I'm collecting some data from sensors and I get the timestamp from it like this: "time": { "seconds": 40, "year": 115, "month": 5, "hours": 7, "…

python python-datetime
Changing the formatting of a datetime axis in matplotlib

I have a series whose index is datetime that I wish to plot. I want to plot the values of …

python pandas datetime matplotlib python-datetime
Why is Python datetime time delta not found?

I am trying to make an array of dates in mmddyyyy format. The dates will start on the current day …

python timedelta python-datetime
TypeError: '>' not supported between instances of 'datetime.datetime' and 'str'

I am new to python date and time types. I have a date value. date = '2018-11-10 10:55:31+00:00' I …

python string datetime python-datetime
Python Pandas: TypeError: unsupported operand type(s) for +: 'datetime.time' and 'Timedelta'

I am attempting to add two series in a dataframe in pandas with the first series being a 24-hr time …

python pandas python-3.6 timedelta python-datetime
Converting datetime string to datetime in numpy (python)

I would like to convert ['17-10-2010 07:15:30', '13-05-2011 08:20:35', "15-01-2013 09:09:09"] into a Numpy datetime object. …

datetime python-3.x numpy pandas python-datetime
python datetime gets object has no attribute today error

I have the following 2 different datetime uses: date=request.GET.get('date','') if date: date = datetime.strptime(date, "%m/%…

python python-import python-datetime
Python: most efficient way to convert date to datetime

In Python, I convert a date to datetime by: converting from date to string converting from string to datetime Code: …

python datetime python-datetime