I need to convert my current date which has the format:
MM|dd|yy --- 12|09|11
I need to convert the format to:
MM/dd/yy --12/09/11
The current system date separator is:
-'|'
I use the code as:
var
sDateOne : TDate ;
begin
Label1.Caption:=datetostr(now); {this display as 12|09|11}
ShortDateFormat:='MM/dd/yy';
DateSeparator:='/';
sDateOne:=StrToDate(Label1.Caption);
FormatDateTime('MM/dd/yy',sDateOne );
Label2.Caption:=datetostr(sDateOne); {this i want as 12/09/11 }
end;
but I get an error at line sDateOne:=StrToDate(Label1.Caption);

Please tell me how to convert the date format and display it?
Here is corrected version of your code:
For
GetLocaleFormatSettingsinformation, please see http://delphi.about.com/library/rtl/blrtlGetLocaleFormatSettings.htm