Many thanks Max for your time, just what I needed
didn't get far with the Format for some reason but used

s:=Copy(s,1,2)+'/'+Copy(s,3,2)+'/'+Copy(s,5,2);

worked a treat

Patrick Sheehan



----- Original Message -----
From: Max Renshaw-Fox <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: 10 September 1999 20:55
Subject: RE: [DUG]: Dates


>
> If it's a one-off, and elegance is not an issue, - also assuming the dates
> are all in the same known format, how about just creating a new string by
> using "copy()" 3 times - as in
>
> Format(%s/%s/%s, [Copy(s, 1, 2), Copy(s, 3, 2), Copy(s, 5, 2)])
>
> Max
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of P Sheehan
> Sent: Friday, 10 September 1999 18:10
> To: Multiple recipients of list delphi
> Subject: [DUG]: Dates
>
>
> Hi all
>
> I have a couple of thousand dates in string format  ie '100999' in a
> database field.
> To convert to Date format I need to insert a charater as a date separator
as
> defined by the date separator global variable.
>
> How do I get the "/" into the string so I can do a StrtoDate().
> any help appreciated
>
>
> Patrick Sheehan
> P+A Computing
> Patrick Anthony Associates Ltd
> 166 Kitchener Rd Milford
> PO Box 31-831 Milford
> [EMAIL PROTECTED]     [EMAIL PROTECTED]
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to