Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a week to a date...

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I want to get the date a week from today... any ideas how...

What i got so far...

var CurrentDate, WeekFromNow : tDateTime
begin

CurrentDate := now();
WeekFromNow := CurrentDate +7;

end;

 
It seems like your code should work (although the IncDay() example is prettier). Are you trying to strip off the time value? In that case, you could use:

weekfromnow := Incday(Date,7);


or:

declare your variables as TDate instead of TDateTime.


Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top