Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Date + 1 not working as expected
Thu, Sep 17 2015 10:30 AMPermanent Link

Trinione

Hi:
I have a simple function that I need to use to find the next Date or even a previous date.

However, it returns Today's date without doing the addition to the date.

-------------------------------------------------------------------------------------------------------------------
function getDate(DateValue: DateTime, moveDays: integer) : DateTime;
begin
 result := Date + moveDays;
end;

ShowMessage(DateToStr(getDate(Date, 1));    // display tomorrow's date

ShowMessage(DateToStr(getDate(Date, -1));    // display yesterday's date
-------------------------------------------------------------------------------------------------------------------
Thu, Sep 17 2015 10:49 AMPermanent Link

Trinione

Never mind.

Found the answer, last post in this thread ► http://goo.gl/SqXH3Y
Image