I would have a look at the link that Nello sent out
(http://www.aimtec.com.au/articles/ItsAboutTime/Default.htm)

The article there mentions a few potention problems with VarToDateTime (for
example it will apparently take 01/13/2000 and interpret as 13 Jan 2000 even
if date settings are d/m/y).

David.

----- Original Message -----
From: "John Christenhusz" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, October 26, 2000 3:00 PM
Subject: RE: [DUG]: StrToDate - DateToStr


> This is great, fantastic, just what I needed.
>
> Thanks a lot Kurt.
>
> John
>
>
> On Monday, October 23, 2000 1:31 PM, Kurt [SMTP:[EMAIL PROTECTED]]
wrote:
> > Try using VarToDateTime. It takes a variant parameter, so you just
> > pass in a string. Being a variant its too slow for doing a lot of
> > calculations, but for a gui it is fantastic as it can handle all
> > these formats without blinking:
> > 'oct 23 00'
> > '23 oct 00'
> > '23-10/00'
> > '23/10 2000'
> > '10/23/00'
> > '23 00 oct'
> > '23 octob 00'
> > all convert to '23/10/2000'
> > 'october 2000'
> > '00 oct'
> > both convert to '1/10/2000'
> > and you only need to trap the EVariantError exception.
> >
> > Cheers.
>
> --------------------------------------------------------------------------
-
>     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"

Reply via email to