ShowMessage(FormatDateTime('yyyy-mm-dd', d));
end;
Delphi does not use StrToDate function! Why?
Thanks.
V is a now a string.
> d := v; // d := EXCEPTION!!! // Delphi does not use StrToDate
> function!!! *Why?*
> // "Could not convert variant of type (String) into type (Double)"
You can't assign a string to TDateTime.
--
Finn Tolderlund
Ping Kam
Not just basically. They are exactly the same.
In the System unit you can see the deifinition:
TDateTime = type Double;
--
Finn Tolderlund
Type
TMyObject = class
private
FValue: Double;
public
property AsDouble: Double read FValue write FValue; // No error
property AsDateTime: TDateTime read FValue write FValue; //
Incompatible types: 'Double' and 'TDateTime'
end;
I would have agreed with you when the compiler stops complaining.
Ping Kam
"Ping Kam" <pk...@quikcard.com> skrev i en meddelelse
news:3f5a...@newsgroups.borland.com...
Ping Kam
"Ping Kam" <pk...@quikcard.com> skrev i en meddelelse
news:3f5a516b$1...@newsgroups.borland.com...
However, that is exactly how I feel when I read your reply 'Not just
basically. They are exactly the same.'.
Ping Kam
"Ping Kam" <pk...@quikcard.com> skrev i en meddelelse
news:3f5b...@newsgroups.borland.com...
Ping Kam
"Ping Kam" <pk...@quikcard.com> skrev i en meddelelse
news:3f5b643c$1...@newsgroups.borland.com...