Hi,
I have an input text field where the user can enter text that might contain a date (MM/DD/YYYY). What is the best way to extract this date information from the input text?
I was thinking of doing the following in the interface object:
1) check if there is a date in the format above (this is standard)
2) if there is a date, extract if from the input text
3) then use the saveInto attribute to save the text information into a description variable and the extracted date into another variable for target date
Any guidance on functions to use/other ideas would be great.
Thank you in advance.
Roberta
Discussion posts and replies are publicly visible
If you can use the RegEx Functions plug-in, this might be a good place to try using the matching functionality it provides, depending on how much other junk the incoming text might have. If you expect it to be pretty much just mm/dd/yyyy though, you might just try wrapping it with "todate()" or something else as simple as that.
So Roberta, why not add a separate field that is a date field component and get them to explicitly enter a date? There are so many issues with a field that "might contain x/y/z" since, by definition, the User can enter simply anything in any format...what's the context here?