parse a string with years month and days....

bkalimili

Registered User.
Local time
Today, 00:27
Joined
Aug 23, 2004
Messages
23
Solution to parse the strings below and get number of months
1) 10 years 5 months 5 days - Should give 5
2) 6 years 10 months 22 days - Should give 10
 
Try this:-

Val(Mid([TextString], InStr([TextString]," month")-2))

^
 
Another option would be using the split function like this:

result = split([TextString] , " ")(2)
 

Users who are viewing this thread

Back
Top Bottom