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

Date Formula -to print the range of the month I'm running

Status
Not open for further replies.

aj3221

Technical User
May 14, 2008
79
US
I don't know if this can be done.

I have a report header that I would like to show the current months date range in. I would like it to say 10/1/2013 - 10/31/2013. Then next month it would say 11/1/2013 - 11/30/2013.

I want it to use the date I am refreshing the report and put in the date range of that month.

I tried using
Minimum ({oeeh.invoicedt}) & "to" & Maximum ({oeeh.invoicedt}) but that of course just gives me the data range from the formula I already have in Select Expert {oeeh.invoicedt} in LastFullWeek.

This runs every Monday for the previous week.

Any help would be appreciated! Thanks!
 
Actually the person I'm doing this report for said they want two fields. One that is the first day of the month & one that is the last day of the month.
 
I think the two formulas below will give you the dates you need.

First of current month:
dateserial(year(currentdate),month(currentdate),1)

Last of current month:
dateserial(year(currentdate),month(currentdate)+1,1)-1
 
Just curious. what is the advantage of dateserial vs. date?
 
it is my understanding/experience that datserial is more tolerant.

for example, with Date if i somehow have a month # that is 13 it does not know what to do and errors, but dateserial will continue and provide a result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top