krydea
asked on
string edit replace - with /
hello,
i'm loading a date from an db file and i whant to change it from 12-01-2004 to 01/12/2004
can someone tell me how to do this basic thing???
thanx greetz carlas
i'm loading a date from an db file and i whant to change it from 12-01-2004 to 01/12/2004
can someone tell me how to do this basic thing???
thanx greetz carlas
Hi
Change the "DateSeparator" global variable to any format you like as:
DateSeparator := '/';
ShowMessage(DateToStr(Date ));
Regards,
Mohammed
Change the "DateSeparator" global variable to any format you like as:
DateSeparator := '/';
ShowMessage(DateToStr(Date
Regards,
Mohammed
or
StringReplace(DateToStr(da te), '-', '/', [rfReplaceAll])
StringReplace(DateToStr(da
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
bleh >< didnt notice that either lol
And I thought krydea was talking about pure string manipulation ;-)
ASKER
sorry
function DateStringFormat(const d: string): string;
begin
result := Copy(d,4,2)+'/'+Copy(d,1,2
end;
// usage:
ShowMessage(DateStringForm
Regards, Geo