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

last month 1

Status
Not open for further replies.

kimchavis

Technical User
Jan 7, 2004
66
US
Can someone help me figure out how to do a date range from 01-01-2005 to the end of the last month.

So If i were pulling the report today, I would want to see 01-01-2005 to 02-28-2005.

Any help would be appreciated.

Thanks,
KIM
 
{table.date} in [date(2005,1,1) to dateserial(year(currentdate),month(currentdate),1-1)]

or

{table.date} in YearToDate to minimum(MonthToDate)

or

{table.date} in YearToDate to maximum(LastFullMonth)

Cheers,
-LW
 
Change from

table.date} in YearToDate to minimum(MonthToDate)

to

table.date} in YearToDate to_ minimum(MonthToDate)


The to_ means to exclude the end date

-LW


 
kskid,

I don't think you meant that--yeartodate would give you dates from January 1 to today's date, so using that as the starting point of a range doesn't make sense. Or am I missing something?

I think it should be:

{table.date} in date(2005,01,01) to maximum(lastfullmonth)

-LB
 
You are right. it should have been

{table.date} in YearToDate and
{table.date) < minimum(MonthToDate)

or

{table.date} in YearToDate and
{table.date) <= maximum(LastFullMonth)

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top