Questions tagged [dateparser]

dateparser provides modules to easily parse localized dates in almost any string formats commonly found on web pages.

46 questions
1
vote
3 answers

Unparsable date format

I am attempting to parse a date String but get this error: java.text.ParseException: Unparseable date: "Oct 1, 1997, 12:00:00 AM" This is the method I am using to parse the Date: public static Date parse(@NonNull String dateString, @NonNull String…
crmepham
  • 4,676
  • 19
  • 80
  • 155
1
vote
2 answers

date parser solution python

while parsing the date using 'dateutil parser' and even by 'moment parser' in python for the date dd/mm/yyyy eg 04/05/2019 it reflects this 05/04/2019 i.e it takes month as the date and vice versa. while if i try the same thing for a date greater…
0
votes
0 answers

Dateparser returns NoneType for all type of date formats

it's all in the title, I tried different versions of dateparser (1.1.8, 1.0.0,...), it always returns None >>> import dateparser >>> dateparser.parse('12/12/12') >>> print(dateparser.parse('12/12/12')) None >>> dateparser.__version__ '1.0.0' >>>…
D_action
  • 83
  • 6
0
votes
1 answer

Javascript Date.parse() returns null in Firefox

I am trying to convert a dates string to milliseconds using Date.parse(). According the web docs : Only the ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) is explicitly specified to be supported. Other formats are implementation-defined and may not…
Grogu
  • 2,097
  • 15
  • 36
0
votes
1 answer

How to formulate logic that will parse month-day date pair and append year based on previous value in Pandas row

Hello and thanks for taking a moment to read my issue. I currently have a column or series of data within a Pandas dataframe that I am attempting to parse into a proper YYYY-MM-DD (%Y-%m-%d %H:%M) type format. The problem is this data does not…
parsem
  • 1
  • 1
0
votes
0 answers

Cannot pickle dateparser using cloudpickle

I'm using the dateparser library to parse some strings and return potential dates. I need to use cloudpickle for distributed use but am receiving an error: import dateparser class DateParser: def __init__(self, threshold:…
Drivebyluna
  • 344
  • 2
  • 14
0
votes
1 answer

Why dateparser module fails to parse date strings in Spanish even setting parameters as languages or locales in Spanish?

I'm trying to parse a large set of files with records that include dates in Spanish with formats like this one 'Ago 01, 2022'. For this task, I'm using the function parse from dataparser module. In the past, I could use successfully that function…
Augusto Sisa
  • 548
  • 4
  • 15
0
votes
1 answer

Can not parse the date field

I have been trying to fix this issue but could not find a solution to it. I have a date column as string type . Trying to convert it to timestamp using date_parse but getting the following error. INVALID_FUNCTION_ARGUMENT: Invalid format:…
Erdal
  • 21
  • 2
0
votes
1 answer

dateparser python ignore trigger words

Let me first share a text: I am Fox Sin of Greed came on Earth in 1666 BC. due date right after St. P was build in 16.05.1703 and bluh bluh I moved to Moscow Feb 2nd, 2022 to work as per deadline And today I read manga Due date for my project is…
user17740942
0
votes
0 answers

Dateparser strict parsing doesn't seem to work for "45 Days"

According to dateparser documentation: parse('December 2015', settings={'STRICT_PARSING': True}) returns None. I would expect that parse('45 Days', settings={'STRICT_PARSING': True}), would also return None. However it returns a datetime object…
An old man in the sea.
  • 1,169
  • 1
  • 13
  • 30
0
votes
1 answer

How to calculate the total seconds between two arbitrary timestamps?

I want to calcualte the total seconds between two arbitrary timestamps. I have the following: import datetime import dateparser now = datetime.datetime.now(datetime.timezone.utc); now_bst = dateparser.parse("26April 11:55 am BST"); before =…
nz_21
  • 6,140
  • 7
  • 34
  • 80
0
votes
0 answers

why Java date formatter ignores seconds, milliseconds and time zone information while parsing date

I am very confused in the below code. Even after passing the correct dateformat for parsing the entire date, time and timezone, why java is ignoring the information beyond minutes. I have a list of date formatters as my incoming date can come in any…
Onki
  • 1,879
  • 6
  • 38
  • 58
0
votes
2 answers

Python Partial Date Parser Function

I have a function that takes in a string and converts the value to date through a parser. Lets call it date converter: def date_converter(x): return dateparser.parse(x).dt.date So if it took in '2021 jan 21' as a string it would become…
John Dahl
  • 3
  • 1
0
votes
1 answer

Dateparser custom current date time consideration config update

import dateparser print(dateparser.parse("1 week")) print(dateparser.parse("1 month")) print(dateparser.parse("6 months")) print(dateparser.parse("1 year")) The above code lines return the below output: 2022-01-27 11:30:50.229535 2022-01-03…
liteyagami
  • 47
  • 5
0
votes
1 answer

Python / Pandas - Parsing Date-Time-Formats using dateparser different Locales

This is my first post here, so feedback on how to better convey my questions is also appreciated. Basically I want to apply a date parser on a folder of .csv-files. Problem is: Files can contain different data-time formats (locales). I chose…