Crystal Reports for Eclipse Designer Guide

Month (x)

Description
Month extracts the month component of a date and converts it to a Number.
Arguments
  • x is a Date value or a DateTime value.
  • Returns
    Whole Number
    Action
    Month extracts the month component of a date and converts it to a Number.
    Typical uses
    Use any time you need only the month component of a date. For example, if you are tracking payments that fall within a given year, you are interested only in the month they arrive; day and year information would be redundant. Also, if you need to use the number of the month in a numeric calculation (Month({file.OCTPMT}) - Month({file.SEPPMT}), for example) use the Month function to extract the month component of the date and convert it to a Number.
    Examples
    Month({file.INVOICE}) - Month({file.PAYMENT})
    Calculates the number of months between the Invoice and the Payment.
    If Month({file.LAST PURCHASE}) < 6 Then
         "You will see some changes since you last shopped our store."
    Else 
         "As you have certainly noticed, we have been making many changes in our store recently.";
    Prints "You will see some changes since you last shopped our store." for those customers whose last purchase was in May or earlier, and prints "As you have certainly noticed, we have been making many changes in our store recently." for customers who have purchased more recently than May.



    SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/