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

Date Array ...

Status
Not open for further replies.

cristianivanoff

Technical User
Nov 13, 2006
43
SE
Hello all.

I would like to make an array with date ranges in the elements. 12 elements and the date ranges are calculated from a date given by the user (the user gives the last date). The date ranges are whole months.

If the date given by user is 2006-11-12. The last element (12th element) of the array should be 20061101-20061130.

How can I do this? and can the array be used in a cross tab as column heading?

Br
Cristian Ivanoff
 
I think you need grouping, not an array. Do a formula field that calcuates months from the specified month. This formula could then be used for a Crosstab, at least in Crystal 10. (Always useful to give your Crystal version.)

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hello,
I use CR9. Could you give an example of such formula?

//cristian ivanoff
 
DateDiff("m", {yourmonth}, @ParamMonth)

Try displaying, to see you get the result you want.

[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