Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract DateTime from Memo
Message
From
09/04/2009 11:53:42
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01393970
Message ID:
01393978
Views:
58
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform