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!

Formula to Populate 2 Date Fields

Status
Not open for further replies.

aj3221

Technical User
May 14, 2008
79
US
Good morning!
I have a report that needs to have a "Claim Start Date" and a "Claim End Date".

This report currently runs the first day of the month for the LastFullMonth.

Right now I have it emailing to me so I can make the Claim Start Date 20130801 and the Claim End Date 20130831. Is there a way to do that with a formula so I don't have to change it every month to the prior months first/last day?

Thank in advance!
 
Formula for prior month first of month
Code:
dateserial(year(currentdate), month(currentdate) -1, 1);
Formula for prior month end of month
Code:
dateserial(year(currentdate), month(currentdate) ,  1 -1 );
 
That is perfect! Thank you so much!
 
An alternative, and perhaps simpler approach would be:

[Code Claim_Start_Date]
Minimum(LastFullMonth)
[/Code]

[Code Claim_End_Date]
Maximum(LastFullMonth)
[/Code]

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top