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

Cdate info need plz 1

Status
Not open for further replies.
Sep 12, 2005
448
US
hi aLl
cr 9.0
ms sql
I have a parameter {?date} and set to default to current date.
i have a field call post-date in my table
the user has the option to change the date
MTD
if he change current date to reflect his choice
if he changes could this be correct in the Cdate formula?

ex: current date is 01/15/2007
and he want records for 01/02/2007

in my formula can i do this

@ MTD
post_date in CDate(year(?Date},month({?Date},1) to
CDate(year(?Date},month({?Date},day(?Date})
your be the same as this
post_date in [2006,1,1] to [2006,01/02]

Thanks



Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Why wouldn't your @MTD formula simply be this:

Code:
post_date in Date(year({?Date}),month({?Date}),1) to {?Date}

All in all there is no reason to use Cdate if the parameter field is a date data type.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top