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

Month and Year in Crystal 2008

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
US
I have a formula as follows:

if month({PayrollDeduct.gifteffdat}) =
Month(currentdate)then 'New Pledge'

this says that if the gifteffdate month equals the currentdate month then New Pledge. I want to expand this and say that if the year is this year, show new pledge pledge. The current formula only considers the month.
 
if month({PayrollDeduct.gifteffdat}) =
Month(currentdate)
and
year({PayrollDeduct.gifteffdat}) =
year(currentdate)
then 'New Pledge'

unless you meant
if month({PayrollDeduct.gifteffdat}) =
Month(currentdate)
else if
year({PayrollDeduct.gifteffdat}) =
year(currentdate)
then 'new pledge pledge'

but i dont think so ;)

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top