dateparser provides modules to easily parse localized dates in almost any string formats commonly found on web pages.
Questions tagged [dateparser]
46 questions
0
votes
2 answers
What is the most accurate way to detect dates in text?
I'm working on a sensitive data recognition (NER) task. Faced with the fact that I can not accurately detect dates in texts. I've tried almost everything...
For example I have this type of dates in my text:
date_list = ['23 octbr', '08/10/1975',…

hidden layer
- 81
- 1
- 1
- 6
0
votes
1 answer
Finding all the dates / events for multiple webpages
I am super new to python / web scraping and I am trying to use beautifulsoup to find all the events (dates) that are listed in various web pages and then output these to a CSV file.
These are the web pages that I have been…
0
votes
2 answers
Getting: INVALID_FUNCTION_ARGUMENT: Invalid format: "" when trying to date_parse a string formatted date
Query:
SELECT date_parse(start_date, '%Y/%m/%d')
FROM sql_question_five_2 ;
date format looks like this in csv: 20210531
being read into table as string.
Have tried a few different things to get it to convert to a date YYYY-MM-DD

KatH.
- 1
- 2
0
votes
1 answer
dateparser returns wrong date when AM/PM is misspelled
Is there any logic to the results below? How can they be avoided?
dateparser.parse('6/16/21 11:00 ma')
Returns 8/7/21 2:14 PM. This is wrong.
dateparser.parse('6/16/21 11:00 eb')
Returns 6/21/16 11:00 PM. This is wrong, and we should prefer…

Michael Covell
- 55
- 5
0
votes
1 answer
dateparser in python returns unexpected result
import dateparser
to_parse = '20210126231003'
parsed = dateparser.parse(to_parse, date_formats=['%Y%m%d%H%M%s'])
print(to_parse)
print(parsed)
I am expecting it to resolve to Jan 26 2021...
but it instead resolved to some date in…

Sameer Sawla
- 729
- 6
- 20
0
votes
0 answers
Python dateparser.parse only returns NoneType object when using AWS EC2 (Running Python 3.7.9)
Running the following simple code works just fine on my local machine running Python 3.7.3, but returns only object type None when running the same file on an AWS EC2 instance running Python 3.7.9. Any thoughts what could be going on? How can I…

srschaecher
- 33
- 4
0
votes
0 answers
How does dateparser get this result?
I'm using the dateparser library and confused by a result:
>>> import dateparser # pip install dateparser
>>> dateparser.parse("20110104")
datetime.datetime(1010, 2, 1, 4, 0)
Can anyone explain how this result is reached? I expected…

Colonel Panic
- 132,665
- 89
- 401
- 465
0
votes
1 answer
how to convert a datetime format to a millisec in python 2?
so python2 does not have datetime.timestamp() is there any way to convert a simple datetime format to epoch like format in other words in milliseconds , or is there any other way to convert the start_date to milliseconds format
from datetime import…

Sec Team
- 47
- 8
0
votes
2 answers
Issue with date_parser: TypeError: parse() takes 1 positional argument but 2 were given
I have got the following error:
TypeError: parse() takes 1 positional argument but 2 were given
I was trying to do a basic data preparation where I wanted to parse the date-time information as a Panda DataFrame index (combine the 'date' and 'time'…

Amhs_11
- 233
- 3
- 10
0
votes
1 answer
Python search custom European time
I'm trying to parse string on Spanish language and get datetime from it.
Is any way to put date format that needs to be searched?
from dateparser.search import search_dates
settings = {'DATE_ORDER': 'MDY'}
string = "26.03.2020 (datos consolidados…

somal
- 53
- 1
- 6
0
votes
2 answers
How to convert Pandas column into date type when values don't respect a pattern?
I have the fallowing dataFrame:
Timestamp real time
0 17FEB20:23:59:50 0.003
1 17FEB20:23:59:55 0.003
2 17FEB20:23:59:57 0.012
3 17FEB20:23:59:57 02:54.8
4 17FEB20:24:00:00 0.03
5 18FEB20:00:00:00 0
6 …

Bruno Ambrozio
- 402
- 3
- 18
0
votes
1 answer
how to fix "ValueError: Timezone offset does not match system offset: 0 != 3600. Please, check your config files"?
while trying to parse some dates using the dataparser lib in python it gets me this error.
import dateparser
dateparser.parse('12/12/12')
ValueError: Timezone offset does not match system offset: 0 != 3600.
Please, check your config files.
I…

M-Wane
- 134
- 13
0
votes
2 answers
Python format incomplete date to YYYYMM
As a start, I am extremely new at Python.
I am receiving an Excel file where the date field is incomplete. The value displays as "190808" (YYMMDD) instead of "2019-08-08".
Part of my automation attempt is to move the file to a different location,…

ben
- 81
- 8
0
votes
1 answer
dateparser search function returns unexpected results
I'm using the dateparser python package to search for dates in a string.
Following string provides unexpected result:
Input string:
Feb 12 SOME STRING TORO ON 508 . 50
Output result:
[('ON 508', datetime.datetime(1900, 1, 1, 5, 0, 8))]
Expected…

codergal
- 31
- 1
- 5
-1
votes
2 answers
Troubles with python dateparser
I am using dateparser and i have got a case, when in the string with date there are other words and I have detected that it doesn't return expected result in this case.
from dateparser import parse
print(parse('April 19, 2006')) # returns…

petrashin_nikita
- 11
- 3