Title: Message
If it is always going to be that format you can.
 
Remove the first 5 chars and call VarToDateTime.
 
procedure Tform1.Button1Click(Sender: TObject);
var
  lDT: TDateTime;
  lDStr: String;
begin
  lDStr := 'Fri, 18 Jun, 2004';
  lDStr := Copy(lDStr, 6, Length(lDStr));
  lDT := VarToDateTime(lDStr);
  TButton(Sender).Caption := FormatDateTime('dd mmm yyyy', lDT);
end;
-----Original Message-----
From: David O'Brien [mailto:[EMAIL PROTECTED]
Sent: 18 June 2004 10:08 AM
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Date conversions

Hi all,

 

Is there any easy way of converting a date string into a TDate?

 

i.e. "Fri, 18 Jun, 2004"

 

Dave.

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to