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

Date selection help

Status
Not open for further replies.

vega83

Programmer
Jun 12, 2008
141
US
Friends here is my selection criteria
{Command.ADDED_DT} in CDate(CSTR(Month(DateAdd("m",-13,{?Date})),0,'')&"/1/"
&CSTR(Year(DateAdd("yyyy",-1,{?Date})),0,'')) to {?Date}

I am getting only 12 months, i,c if i slect may2009, i am getting data from May2009 to june 2008 not may 2009 to may2008, Any reason? How can i achieve to get 13 months?.
THanks a ton,
V
 
Chnage sect to -14

{Command.ADDED_DT} in CDate(CSTR(Month(DateAdd("m",-14,{?Date})),0,'')&"/1/"
&CSTR(Year(DateAdd("yyyy",-1,{?Date})),0,'')) to {?Date}

Ian
 
Ian, I have already tried it once, but still i get same 12 months only
 
Are sure that your data set goes back to May 2008.

Create a formula
@test
CDate(CSTR(Month(DateAdd("m",-14,{?Date})),0,'')&"/1/"
&CSTR(Year(DateAdd("yyyy",-1,{?Date})),0,''))

Place in report and see what is returned.

Ian
 
Yes, it does when I select july09 it goes back only till aug 08
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top