Nick

You don't say what version of FMP but if you are 8+ then here's what I'd do....

I love GetValue() and ValueCount() functions.  You could push the text into a 
variable, swap out all spaces, commas etc with pilcrows using Substitute(), 
then loop through the variable value by value until you locate something that 
resembles the 3 digit month.  If that works out you test next value - is it one 
or 2 digits - if so likely the day.  The next value should test out as 4 digits 
- the year.

If you Filter() the text string to allow only letters, numbers and spaces you 
can make the substitute easier - " " for "¶"

This would work but has a huge dependency upon "Nov 10, 2006" being the only 
way the date is input.  "10 Nov 2006" would blow things up as would 
"11/10/2006".  You'd need to throw in a lot of code for the exceptions.

Off to a meeting but if you like I can post some code later...

Stephen

----------

Pi = 3.141592653589...  After the 762nd digit there is a group of 6 consecutive 
9's. This is referred to as the Feynman Point as the Nobel winning physicist 
once stated in a lecture that he wished he could memorize all the digits of Pi 
up to the group of six 9's so he could continue: “nine, nine, nine, nine, nine, 
nine, and so on.” 

On Jan 25, 2013, at 8:32 AM, Nick Adams <[email protected]> wrote:

> Would someone be so kind as to give me a hand.
> I am an amateur and only use FMP for my own projects.
> 
> I am trying to parse the date out of a text field.
> 
> The text field contains something like this:
> some text, Nov 10, 2006 - some more text
> 
> The date is between a comma and a dash.
> 
> I have been trying various combinations of text functions but cannot get 
> anything meaningful.
> 
> 
> Nick
> 
> Karystos, Greece
> 
> 
> 
> 
> 

Reply via email to