padlocked17
Registered User.
- Local time
- Today, 08:15
- Joined
- Aug 29, 2007
- Messages
- 275
All,
I'm trying to create an expression that evaluates the date in the ACC_DATE field and then displays the last day of either the 2nd or 4th quarter of the year based on whether or not the date in ACC_DATE is in the 1st or 2nd quarter (Would display last day in 2nd quarter) or 3rd or 4th quarter (Would display the last day in 4th quarter)
Basically I'm looking for a Semi Annual type function that displays the last day in a half of a year based on the input date.
Where I get stuck is:
I know I can get the last day of the quarter by using the following, but I want the last day of the Semi Annual:
Is there a better way of doing this?
I'm trying to create an expression that evaluates the date in the ACC_DATE field and then displays the last day of either the 2nd or 4th quarter of the year based on whether or not the date in ACC_DATE is in the 1st or 2nd quarter (Would display last day in 2nd quarter) or 3rd or 4th quarter (Would display the last day in 4th quarter)
Basically I'm looking for a Semi Annual type function that displays the last day in a half of a year based on the input date.
Where I get stuck is:
Code:
IIf(DatePart("q",[ACC_DATE])<3, , )
I know I can get the last day of the quarter by using the following, but I want the last day of the Semi Annual:
Code:
DateSerial(Year([ACC_DATE]), Int((Month([ACC_DATE]) - 1) / 3) * 3 + 4, 0)
Is there a better way of doing this?