I have a DateTime variable and I assigned a date value to it. How I can increment this value by 1 day (or number of days). I Delphi I would just say MyVar:=MyVar+1. But this does not work in RBuilder.
I'm using TDateTime variable declared in OnPrint procedure for a label, not ppVariable. And sometimes it works and sometimes it does not. It works if I use code like this:
TDateTime is just a Double type so there should be no difference between those two statements as long as the data field is being returned as the appropriate type.
Comments
event increment it's Value property, i.e.
ppVariable1.Value := ppVariable1.Value + X
where X is the increment/decrement value. 1 corresponds to 1 day (5 is 5
days and 1/(24*60) is 1 min, etc)
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
ppVariable. And sometimes it works and sometimes it does not. It works if I
use code like this:
MyVar:=MyTable['Date_Field']+10;
But this does not work:
MyVar:=MyTable['Date_Field'];
MyVar:=MyVar+10;
"Alexander Kramnik (Digital Metaphors)" wrote
those two statements as long as the data field is being returned as the
appropriate type.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com