December 5th, 2012, 01:20 PM
Help with a specific date formula
I am trying to make my current reports fill the information needed automatically with a just a click of the refresh button, but I'm not there yet. I have to change my date values either daily for some fields, weekly, or monthly. Here is the following of what I would like my code to do.
If its the 1st of a month, then pull previous months data, else pull current month. (Right now I would not be worried about a circumstance where the last of the month ended on a friday, and then started back at work on a monday, where the 1st of the month day would of pulled data from friday for the final month report, but didnt because of how the date fell, this could be tackled later or now depending on how bad the code is.)
I also have a code that pull previous workers data, so a Date()-1 for any day that wasn't monday, and if monday then Date()-3. I know the above date function syntax isnt valid, just used it as an example.
Also if there was a way to right the Date- code above in access for an if statement(I pull a single report from access that also requires this) with their syntax that would be appreciated.
I am using crystal reports 2011, and access 2010.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!