Questions tagged [python-dateutil]

The dateutil module provides powerful extensions to the standard datetime module, available as an extension module which is compatible with Python 2.3+.

The dateutil module provides powerful extensions to the standard datetime module, available as a Python extension module which works with Python 2.3+.

432 questions
0
votes
0 answers

Deploy to heroku fails to deploy "no module dateutil.parser" when it's included in requirements.txt

I'm a django newby and this is my first question posted to StackOverflow: I've successfully deployed a couple of apps to heroku over the past month but when I added a module fixed2csv that imports dateutil.parser, heroku fails to find the module…
0
votes
2 answers

Localize datetime (timezone aware) from timezone offset

I have a UTC timestamp and a timezone offset timestamp (both in milliseconds): utc_time = 1394452800000 timezoneoffset = -14400000 If I wanted to get the datetime I would do : print datetime.utcfromtimestamp(utc_time/1000) >>>2014-03-10…
Diolor
  • 13,181
  • 30
  • 111
  • 179
0
votes
1 answer

Dateutil parser TypeError

import argparse import gzip import dateutil.parser import sys def main(): userID = "UserID" previous_timestamp = "2000-01-01 00:00:00" t_value = 0 parser = argparse.ArgumentParser() # deze regel is nodig om de file als een argument mee te…
user3289867
  • 109
  • 3
  • 12
0
votes
1 answer

Python: time conversion

I have been banging my head against Google and SO and not getting anywhere, but I am sure it has been answered a hundred times and is just buried. I am receiving a time from a soap service and need to convert it to the time specified in the timezone…
Dave_750
  • 1,225
  • 1
  • 13
  • 28
0
votes
1 answer

Python Convert String to Local DateTime to UTC DateTime

Really stuck here. I've had a look at various answers but zone of them seem to work (Python2.7) I've got a string fileGenTime, representing a time/date. I need to parse it into a date/time and then convert it into UTC. I've tried using 'pytz' and…
AlanF
  • 25
  • 4
0
votes
0 answers

Identify and convert timezone in Python

In my file I have columns of date in the ISO 8061 format with timezone information, here is the sample input…
Jenn Cole
  • 99
  • 1
  • 2
  • 10
0
votes
1 answer

unable to install matplotlib 1.3 - import fails due to dateutil

On Ubuntu 12.04 Desktop I uninstalled matplotlib 1.1.1 and tried installing matplotlib 1.3 via pip install matplotlib. Everything seems to have worked but now when I try to import matplotlib I get the following: Python 2.7.3 (default, Apr 10 2013,…
dreamwalker
  • 1,693
  • 3
  • 18
  • 23
0
votes
1 answer

set up Darwin Calendar Server get an error about "MD5 sum for download file..."

When I set up Darwin Calendar Server, there is an error about download the dateutil: Downloading dateutil... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total …
Cheng
  • 1,169
  • 2
  • 8
  • 8
0
votes
2 answers

With python How do i get the date by quarter

Using either python, pandas or dateutil, how do I get last friday of the three month period, where the period end could be april. Since I am targeting a "focal date", which is last friday of the months with a three month lead time, I may need to…
Merlin
  • 24,552
  • 41
  • 131
  • 206
0
votes
1 answer

Parser in dateutil fails to render hour correctly

Perhaps I am missing something obvious, but does anyone know why the parser from dateutil fails to render the following hour correctly? (The hour should be 20 instead of 0.) >>> from dateutil import parser >>>…
Justin O Barber
  • 11,291
  • 2
  • 40
  • 45
0
votes
2 answers

How to convert json string into normal string?

I had an earlier question, which I have deleted in favour of this one. Since I was under the wrong assumption that it had something to do with the dateutil version. test1 = dateutil.parser.parse("2013-01-24T16:50:42+00:00") this works fine and I…
Houman
  • 64,245
  • 87
  • 278
  • 460
0
votes
1 answer

Default "future" year when effecting date conversion with dateutil

The following date patterns 1st January 30th April are easily parsed into instances of datetime.date via dateutil.parser.parse(): In [1]:from dateutil.parser import parse In [2]: parse('1st January') Out[2]: datetime.datetime(2012, 1, 1, 0,…
Joseph Victor Zammit
  • 14,760
  • 10
  • 76
  • 102
-1
votes
1 answer

How do I go about incrementing a datetime value by one month using 'relativedelta(months=1)' without affecting the numerical day value?

enter image description here The code I wrote above works fine except I want the numerical day (%d) of the month to stay unchanged (30th) for all the months bar February (28th). The fact that the day value remains 28 after the month February is…
-1
votes
2 answers

How to use parser on multiple time objects

I have an list: list = ['2022-06-01', '2022-02-02'] Now am using parser to convert this to python date object. like this, from dateutil import parser def to_date(value): for data in value: return parser.parse(data) Above one gives…
sixovov947
  • 205
  • 1
  • 7
-1
votes
1 answer

How to print only date with module dateutil?

I want to print date format when I type numbers but when I use module dateutil parser it prints date with time, but I want only date. How to do it? The code: from dateutil import parser data3 = parser.parse(input("Date of birth (yyyymmdd):…
Maria
  • 117
  • 9
1 2 3
28
29