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

Adding days to date 2

Status
Not open for further replies.

angels2

Technical User
Apr 4, 2004
84
US
I do not know if this can be done I am pulling my information from an as400 db2 into a table then running a query and want to ad 1 day to a date field which is no problem except for Friday I need to add 3 to bypass Sat and Sun and move Friday's date to Monday is this possible?
 


Hi,
[tt]
[MyDate]+iif(Format([Mydate],'ddd')='Fri',3,1)
[/tt]


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Newdate: [date field] + IIf(Weekday([date field])=6, 3, 1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Skip, your suggestion is highly dependant on locale...
 

True.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top