I am pulling data from a cashe database on Win XP machine using Crystal 10. How do I Add days to a date. I want to use DateAdd("d",+7,startdate) is this good syntax and if I want to get the date 37 days ago can I use DateAdd("d",-37,startdate)?
I am running a report from a date parameters Month and Year. The writer of this report uses this two date parameters in different palaces. What type of formula would I use in my record selection if I want to display on the data between the first day of the month to the last day of the month.
Example:
I enter March and 2006
I want to see all of the data between 3/1/2006 - 3/31/2006.
If you're entering 3 for March, then they probably set it up as a number, and the year as a number, but whichever it is, the record selection would be something like:
{table.date} >= cdate({?MyYearParameter},{?MyMonthParameter},1)
and
{table.date} < dateserial{?MyYearParameter},{?MyMonthParameter}+1,1)
If they haven't set it up as a numeric, you should. You can also manually populate the month names in a pull down list of a numeric parameter to display ONLY the description, so that the users see the months, but you're working with a numeric.
Easier to code, and better for the user to just select a month.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.