Crystal Reports for Eclipse Designer Guide

Day (x)

Description
Day extracts the day from a Date or DateTime value and returns a whole number.
Arguments
  • x is a Date value or a DateTime value.
  • Returns
    Whole Number (the day of the month)
    Action
    Day extracts the day from a Date or DateTime value and returns a whole number.
    Typical uses
    Use any time you need only the day component of a Date or DateTime value. For example, if you are tracking payments that fall within a given month, you are interested only in the day they arrive; month and year information would be redundant. Also, if you need to use the day of the month in a numeric calculation (example: Day({file.OCTPMT}) - Day ({file.SEPPMT})), use the Day function to extract the day of the month and convert it to a Number.
    Examples
    Day({file.LAST INVOICE})
    Returns 10 where the last invoice date was the 10th day of the month.
    If Day({file.LAST PAYMENT}) < 15 Then 
         "Past Due" 
    Else 
         ""
    If the day of the last payment was less than 15, print "Past Due", otherwise print nothing.
    Day(CDateTime(1996, 3, 3, 10, 33, 20))
    Returns 3.



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