>I have a string that could contain one or more dates. The thing is that those date are of type character.
>
>How could I replace those dates in this string by their equivalent representation in date format
>
>Exemple:
>
>"AADSE 1999/11/28 ASDF 1999/10/29
>
>becomes
>
>"AADSE {^1999-11-28} ASDF {^1999-10-29}"
>
>
>Is there a VFP function that would make it possible to do this?
>If not what would be the easiest way?
PMFJI so late, but I'd handle it like this:
for i=words(s) to 1 step -1
lcStr=wordnum(s, i)
if ctod(lcStr)#{}
lcNstr='{^'+lcStr+'}'
s=strtran(s, lcStr, lcNstr)
endif
endd
Of course, I assumed Set Library to FoxTools :)