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

count total days

Status
Not open for further replies.

hlkelly

Technical User
Jul 11, 2003
108
US
The DateDiff function works great: CalcShowDays: (DateDiff("d",[start date],[end date])

Except I want to know how many total days the show spanned. This calculates the difference but I need to include the first date. If the dates were the same (only one show day), it returns a zero.

Any help appreciated. Thank you.
 
Then add one to the result:
Code:
CalcShowDays: (DateDiff("d",[start date],[end date]) [blue][b]+ 1[/b][/blue]


Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Another way:
CalcShowDays: 1+[end date]-[start date]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top