Crystal Reports for Eclipse Designer Guide

Year (x)

Description
Year extracts the year from a date and returns it as a Number.
Arguments
  • x is a Date value or a DateTime value.
  • Returns
    Whole Number
    Action
    Year extracts the year from a date and returns it as a Number.
    Typical uses
    Use this function any time you need to use a year, converted to a Number, in calculations or comparisons.
    Examples
    Year({file.LAST INVOICE ON})
    Returns 1989, where the last invoice date was in 1989.
    If Year({file.LAST UPGRADE}) < 1988 Then
         "P.S. You are missing out on many of the benefits of our new, improved version."
    Else
         ""
    Prints a P.S. for those customers who last upgraded prior to 1988, and prints nothing for those customers who show a more recent upgrade.
    Year(CDateTime(1996, 3, 3, 10, 33, 20))
    Returns 1996.



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