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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

@adjust - date range!

Status
Not open for further replies.

DoctorGonzo

Programmer
Jan 23, 2004
48
0
0
GB
Hi guys,

I want a drop down field containing 5 dates - 2 days either side of today.

Anyone got any ideas? I know an @adjust will be necessary!

Cheers!
Gonzo
 
You simply need to calculate the variables and string them together to make a multi-value list.

Something like this:
Code:
WkToday:=@today;
WkDate_m2:=@Adjust(WkToday;0;0;-2;0;0;0);
WkDate_m1:=@Adjust(WkToday;0;0;-1;0;0;0);
WkDate_p1:=@Adjust(WkToday;0;0;1;0;0;0);
WkDate_p2:=@Adjust(WkToday;0;0;2;0;0;0);
WkList:=WkDate_m2:WkDate_m1:WkToday:WkDate_p1:WkDate_p2;

Then use WkList as values for your drop-down list.

Hope this helps !

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top