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
1 answer

cannot import function name

All my files are in a same directory I'm fresh in python and I'm trying to code functions in a Preprocessing file like this: #Preprocessing file from dateutil import parser def dropOutcomeSubtype(DataFrame): …
0
votes
1 answer

ImportError: matplotlib requires dateutil- python

I get this error when i try to import matplotlib. I have installed matplotlib. Traceback (most recent call last): File "", line 1, in import matplotlib File…
0
votes
1 answer

pip install python-dateutil does not work

The command: pip install python-dateutil Give this error: Collecting python-dateutil Could not find a version that satisfies the requirement python-dateutil (from versions: ) No matching distribution found for python-dateutil But easy_install…
mgcdanny
  • 1,082
  • 1
  • 13
  • 20
0
votes
0 answers

ImportError: Missing Required Dependencies [ 'dateutil' ]

I tried to use a code, where I use pymc3, but I get an error: ImportError: Missing required dependencies ['dateutil']. I installed dateutil, but it still gives me this error.
VD97
  • 3
  • 2
  • 6
0
votes
2 answers

Can't install python-dateutil

I've tried to search through the same problem on stack but none was helpful and precise. I tried to install python-dateutil. I did it one way and then the other: 1) I downloaded python-dateutil-2.4.2.tar.gz from…
aleksy.t
  • 267
  • 2
  • 18
0
votes
0 answers

Python: Converting from one time zone to another yields weird non-whole number hour difference

I'm simply trying to take a naïve time, give it a local time zone, and then convert it into UTC. I'm using the following code: create_time_local = parser.parse(timestring).replace(tzinfo=timezone('America/Chicago')) create_time_utc =…
Jeremy T
  • 758
  • 2
  • 9
  • 23
0
votes
1 answer

Using datetime and dateutils to calculate a journey

I am using dateutils to forecast the arrival time on a journey. I can represent start time as a datetime object. That's nice. I can represent the journey_time as a timedelta. That's also nice Problem: What's unclear to me is how I shall represent…
root-11
  • 1,727
  • 1
  • 19
  • 33
0
votes
1 answer

parse a date to utc unixtime

a commandline program i am writing accepts dates as arguments. i need to convert these to a utc unix timestamp for internal use within the program. so far i have the following test script, but its not working: >>> import time >>> from dateutil…
mulllhausen
  • 4,225
  • 7
  • 49
  • 71
0
votes
2 answers

Why Python datetime and JS Date does not match?

I have this code, that returns UTC offset from given date: >>> import datetime >>> import pytz >>> cet = pytz.timezone("Europe/Moscow") >>> cet.localize(datetime.datetime(2000, 6, 1)) datetime.datetime(2000, 6, 1, 0, 0, tzinfo=
Patrick Burns
  • 1,763
  • 6
  • 21
  • 35
0
votes
2 answers

Create 15-min slots between two hours in Django

I am working on simple task management tool. I need to generate dropdown which shows available time slots between two particular hours in 15 min intervals, like (input) 13:00 - 14:00 (output) 13:15, 13:30, 13:45, 15:00 (input) 10:00 -…
dease
  • 2,975
  • 13
  • 39
  • 75
0
votes
1 answer

python: UTC to local daylight savings time

Now that it's daylight savings time in my timezone, I'm having a problem translating UTC to local time. >>> from dateutil.parser import parse >>> from dateutil import tz >>> dt = parse('1:30').replace(tzinfo=tz.tzutc()) >>>…
foosion
  • 7,619
  • 25
  • 65
  • 102
0
votes
0 answers

python datetime relativedelta gives different values

I have the following code to get a Friday always later than the base date. def get_next_settlement_date(base_date): settlement_date = base_date + relativedelta(days=1, weekday=FR) I have the following unit test: for i in range(7): base_date…
James Lin
  • 25,028
  • 36
  • 133
  • 233
0
votes
1 answer

Parser date in Python

I've a list of dates. Some of the dates get parsed using from dateutil import parser , but others dont. The list of dates that dont get parsed are :- date1 = 'Tue Feb 10 2015 12 52pm IST' date2 = '10 February 15 08 35am' date3 = '2015 02 10 08 24…
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
0
votes
1 answer

Python Dateutil parse() parameters

I am fairly new to Python and apologize in advance if this is a dumb question! I am trying to use the parse() function to normalize the date and time I am receiving from some XMPP timestamps. t1 = parse("20141126T03:44:18") print t1 If I pass a…
0
votes
1 answer

Cannot import name StringIO when importing dateutil

I'm having a 'Cannot import name StringIO' error message when importing dateutil which tries to import StringIO but cannot find it. Here is complete trace: (DEV)arbi@el-oued:~/Work/sentimentpy$ python core/main.py Traceback (most recent call last): …
bachr
  • 5,780
  • 12
  • 57
  • 92