Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

My clients has contracts entered with loose descriptions for dates. Fortunately they are consistent with typing the month before the date.

e.g.

Fri June 29 - Sun July 1, 2007

Apr 26 - Apr 29, 2007

Friday Jan. 12th & Saturday Jan. 13th, 2007

For sorting reasons I would like a calc or custom calc what would extract the first date in the string.

Has anyone see such a function?

If not here is what I am thinking:

1. sub out all day name and abbreviations.

2. sub out all punctuation and ampersands.

3. sub out all double spaces.

4. sub out all number extensions 4"th", 3"rd".

5. sub all full month names to abbreviated 3 character names.

6. parse out abbrv + date: left (3+4)

7. convert to date.

7.

dates_detect.zip

I would try it this way:


Let ( [

mask = Substitute ( Lower ( text ) ; 

[ "jan" ; "mmm" ] ; [ "feb" ; "mmm" ] ; [ "mar" ; "mmm" ] ; [ "apr" ; "mmm" ] ; 

[ "may" ; "mmm" ] ; [ "jun" ; "mmm" ] ; [ "jul" ; "mmm" ] ; [ "aug" ; "mmm" ] ; 

[ "sep" ; "mmm" ] ; [ "oct" ; "mmm" ] ; [ "nov" ; "mmm" ] ; [ "dec" ; "mmm" ] ) ;

posM = Position ( mask ; "mmm" ; 1 ; 1 ) ;

mmm = Middle ( text ; posM ; 3 ) ;

m = Ceiling ( Position ( "janfebmaraprmayjunjulaugsepoctnovdec" ; mmm ; 1 ; 1 ) / 3 ) ;



num = Filter ( text  ; "0123456789" ) ;

posD = Position ( text ; Left ( num ; 1 ) ; 1 ; 1  ) ;

d = GetAsNumber ( Middle ( text ; posD ; 2 ) ) ;



y = Right (num ; 4 )

] ;

Date ( m ; d ; y )

)

  • Author

brilliant "comment" - thanks

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.