Date extraction

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Date extraction Sun May 16, 2021 3:15 am • by chrisbunch
I have a monthly bank statement which prints the date as a range in the format "5 April to 4 May 2021". The date I want to capture is "4 May 2021" but all the patterns I have tried return "5 April 2021". How can I persuade Hazel to ignore "5 April to " ?

Chris
chrisbunch
 
Posts: 12
Joined: Sun Jul 24, 2016 10:13 am

Re: Date extraction Mon May 17, 2021 10:53 am • by Mr_Noodle
Can you post the pattern you are using?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Date extraction Mon May 17, 2021 11:11 am • by chrisbunch
I have tried a few, including for example:

31...December...1999

to 31 December 1999

...31...December...1999

Automatically detect date format 1st & 2nd occurrences
chrisbunch
 
Posts: 12
Joined: Sun Jul 24, 2016 10:13 am

Re: Date extraction Tue May 18, 2021 9:53 am • by Mr_Noodle
Can you check to see if the day (31) is underlined or not? If it is underlined, pick the non-underlined one. The underlined version means that the day must have two digits, so for "4", it would expect "04".
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Date extraction Tue May 18, 2021 11:06 am • by chrisbunch
31 is not underlined. (1999 is)
chrisbunch
 
Posts: 12
Joined: Sun Jul 24, 2016 10:13 am

Re: Date extraction Wed May 19, 2021 10:49 am • by Mr_Noodle
First off, can you try 5.0.7 that was just released? If you still have the problem, report back.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Date extraction Thu May 20, 2021 6:05 am • by chrisbunch
No change with 5.0.7 unfortunately - at least with the attached pattern.

I am struggling to devise a pattern that will capture "4 May 2021" from "5 April to 4 May 2021'.

Everything I have tried (including matching 1st or 2nd occurrence) captures "5 April 2021".

It was working for many years previously. I think it may have stopped working as intended with Hazel 5.

[img]chrisbunch.uk/docs/ScreenShot2021-05-20@10.31.35.png[/img]
chrisbunch
 
Posts: 12
Joined: Sun Jul 24, 2016 10:13 am

Re: Date extraction Thu May 20, 2021 9:38 am • by Mr_Noodle
Can you export your rule and email it in, along with a sample document demonstrating the problem? Make sure to black out any personal info.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron