For example, you might be trying to subtract one year from today's date or subtract 30 days from a specific date.
When Year-To-Date information is calculated in Crystal Reports, sometimes it is necessary to compare data for the current year to the previous year. You would need to subtract one year from today's date.
Use the DateAdd() function in a formula field.
For example: subtract one year from the today's date: DateAdd("yyyy", -1, CurrentDate) If today's date is 4/1/2015 this formula will return 4/1/2014.
For example: subtract 30 days from 4/1/2015: DateAdd("d", -30, Date(2015, 04, 01)) This formula will return 3/2/2015.