DateDiff in Crystal Report

Hi guys,

I need help in the following scenarios

I will pass a date range parameter to a report. How to manipulate the date using datediff or other method so that for example:

Date Range: 1 Auguts 2007 - 31 August 2007.....but inside the report the date will be manipulated intothe month before which is 1 July 2007 - 31 July 2007?

Thank you for the help.....

[447 byte] By [TommyGL] at [2008-1-7]
# 1

anyone can help? i have tried

{command.date_in} = DateAdd ("m", -1, CDateTime ({?DateRange}))

but it prompts error :"A Date is required here".....how to make it recognise date range parameter as date? thanks

TommyGL at 2007-10-2 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 2
Minimum ({?DateRange})
or
Maximum ({?DateRange})
JoeBeam at 2007-10-2 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...

Visual Studio

Site Classified