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!

Increment Date Value

Status
Not open for further replies.

TaylorTot

Technical User
Dec 23, 2003
96
0
0
US
Hello,

I'm working in Crystal v8.5. I have a start date and an end date. I would like to increment the date value by month. Here is an example of what I would like:

Start Date = 1/1/2005
End Date = 4/1/2005

I would like a variable that returns a value for the following:

1/1/2005
2/1/2005
3/1/2005
5/1/2005

I thought I could use the DateAdd function but it isn't working. Can anyone provide any suggestions? Thanks!
 
I'm missing how your two start and end dates should return four date values. Also, what was your formula that used dateadd and what were the results?

damon
 
{your.date}+1 ought to add a day. To do it long-windedly in DateAdd would be DateAdd("d", 1, {your.date}).

Just what did you try that didn't work? It helps to post formulas that are failing.

Also if I were doing it, I'd select data between the two dates, then group them by date.

Also consider using a Crosstab.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top