Link to home
Start Free TrialLog in
Avatar of geocoins-software
geocoins-software

asked on

Date String to TDate

I need to convert a date string to a TDate

How to convert  'November 3, 2008'   to 11/03/08

thanks
Avatar of MerijnB
MerijnB
Flag of Netherlands image

You want to avoid this at all cost, so if you do this, you probably went somewhere wrong earlier.

Why do you want to do this?
Avatar of geocoins-software
geocoins-software

ASKER

This is a string returned from parsing an html file.

<td valign="top">October 28, 2008      </td></tr>

thanks
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ow, the FormatDateTime should be

ShowMessage(FormatDateTime('MM/DD/YYYY', ConvertDate('November 3, 2008')));
oops again and the year to YY

ShowMessage(FormatDateTime('MM/DD/YY', ConvertDate('November 3, 2008')));
is the website always returning the date in the same language, is this the same language is the machine your app runs on (always)?
don't forget in the implementation to add the

uses StrUtils
THANK YOU!