Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extract DateTime from Memo
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01393970
Message ID:
01393985
Vues:
55
very good! thanks

>I would use regular expressions
>
>PUBLIC loList
>LOCAL loRegExp AS "VBScript.RegExp"
>lcText = "some text entered with date time field 04/09/2009 11:18:26 AM and then some more text 04/10/2009 02:45:00 PM whatever."
>loRegExp = CreateObject("VBScript.RegExp")
>loRegExp.Global = .T.
>loRegExp.Pattern =  "(\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2} (AM|PM))"
>loList = loRegExp.Execute(lcText)
>*? loList.Count
>FOR i=1 TO loList.Count
>	? loList.Item(i-1).Value
>ENDFOR
>
>
>>I have a table with memo field where a datetime can be entered at various points in the field
>>
>>How can i extract this datetime?
>>
>>example for {04/09/2009 11:18:26 AM}
>>
>>
some text entered with date time field 04/09/2009 11:18:26 AM and then some more text

>>
>>and i need to extract the "04/09/2009 11:18:26 AM" or what ever datetime is present
>>thanks in advance
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform