You must be interested in the time portion to use that function. If you look
in help you will see it says.
Note: The format of the date and time string varies when the values of
date/time formatting variables are changed.
So mm/dd/yy is not a fixed format it was simply used in the format example.
Your problem is allowing either format to get into your string to be
converted. If you are consistent and use DateTimeToStr with StrToDateTime
then you shouldn't have this problem. If you have no control of the string
you are reading cause it came from another source, yes you do have problems.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Damien Long
Sent: Wednesday, March 21, 2001 12:07 PM
To: Multiple recipients of list delphi
Subject: [DUG]: changing a string containing a USA date to an Aussie
date
I have a slightly large problem of changing a Date in a string from being
mm/dd/yy to dd/mm/yy because of the regional settings on the computers here
use aussie english and not american. The Function StrToDateTime uses the
american date format mm/dd/yy and so when i use that function it raises an
exception because the settings on the computer use dd/mm/yy. If you
understand my problem, I would love some assistence.
Thanks in advance
Damien Long
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"