Brian Dunning's FileMaker Custom Functions

GetDates ( text )

extracts all dates from a text field

  Average rating: 4.5 (30 votes) Log in to vote

Fabrice Nordmann   Fabrice Nordmann - Show more from this author
1-more-thing
https://www.1-more-thing.com

Share on Facebook Share on Twitter

  Sample input:
ab12-1-05cd5/6/07
  Sample output:
12/01/05
5/06/07

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

extracts all dates from a text field

 

Comments

cbum   cbum, baltimore
May 9, 2011
This is only listing the first Date of the following example:

cbum 5/9/2011 2:55:18 PM LS ->> LS‡Hi
cbum 5/9/2011 2:55:17 PM LS‡Hi ->> LS
Kristen UZlab Kristen 4/29/2011 4:27:28 PM CU‡Hi ->> CU‡Hi‡LS
Kristen UZlab Kristen 4/29/2011 4:27:28 PM [---] ->> CU‡Hi

Why?
 
Fabrice   Fabrice, Brussels
May 9, 2011
Hi,
sorry, this is a very old function, but my guess is that you're using a non-American date format DD/MM/YYYY, and this text is formatted MM/DD/YYYY.
 
Norman   Norman, Aude, France
May 29, 2018
Did a great job for me. Put the results (Replace field contents) into a date field which converted all dates found to DD/MM/YYYY.

I imagine it would not be difficult to edit the function to handle US dates or ISO 8601 dates.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.