True,

So to get past this look at using

function EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word):TDateTime;
this is found in DateUtils.

Then you can break your string date time value into parts in order to convert them to a TDateTime value.

But Cheng Wei's solution also works e.g. '10-jul-2007'

All the best,
Mike

Jeremy North wrote:
For simple date time conversions check the ShortDateFormat :=
'dd/mm/yyyy'; before converting StrToDateDef(MyDate, 0);

FWIW setting those variables in SysUtils (ShortDateFormat et al.) is
not thread safe. So if you are using threads you may run into issues.

cheers,
Jeremy




_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to