Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extract DateTime from Memo
Message
De
09/04/2009 11:53:42
 
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:
01393978
Vues:
60
>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</pre >
>
>and i need to extract the "04/09/2009 11:18:26 AM" or what ever datetime is present
>thanks in advance
Something like this:
Create Cursor results (result T)
Index On result Tag result
cText="some text entered with date time field 04/09/2009 11:18:26 AM and then some more text"
nLen=Len(cText)
For nLoop=1 To nLen
	cTrialtext=Substr(cText,nLoop,22)
	tTrial=Ctot(cTrialtext)
	If Empty(tTrial)
		Loop
	Endif
	If Seek(tTrial,'results','result')=.T.
		Loop
	Endif
	Insert Into results Value(tTrial)
Endfor
Select results
Browse
Close Databases All
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform