Depends what database but you should be able to use substring and an update
SQL.

eg. Update MyTable set MyDate = SubString(MyDate,1,2) + '/' +
SubString(MyDate,4,2) + '/' +
SubString(MyDate,6,2)

If the field isn't big enough you would need to inport it into another table
with a bigger field. 

The other way would be to also use cast and copy the string to a date field.

-----Original Message-----
From: P Sheehan [mailto:[EMAIL PROTECTED]]
Sent: Friday, 10 September 1999 06: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