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

Crystal XI Date Formula

Status
Not open for further replies.

pungigi

Programmer
Oct 29, 2003
115
0
0
US
I have a report designed which references the following formula:

TAPTDT is in the period of AllDatesToYesterday, is there a way to say...

AllDatesThruMidMonth or END OF MONTH???
 
You'd need to state what midmonth is to you, does that mean the 15th, or?

Here's how to get an end of the month:

dateserial(year(currrentdate),month(currrentdate)+1,1)-1

So a record selection formula might look like:

{table.date} <= dateserial(year(currrentdate),month(currrentdate)+1,1)-1

For midmonth it might be:

{table.date} <= dateserial(year(currrentdate),month(currrentdate),15)

End of month isn't very descriptive either, do you want this month, last month, or?

Hopefully you'll understand the above and it will prove applicable for your needs.

-k
 
Sorry so unclear, what happens is around the 10th of each month I run a report that needs to be Earliest out there thru end of prior month and then around the 26th of each month I run a report that needs to be earliest out there thru mid/15th of prior month. Will your formulas work for this scenario???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top