Class DateDiffExpression


  • public class DateDiffExpression
    extends Expression
    Returns the difference between two dates.
    Since:
    2.3
    Since server release
    5.0
    • Method Detail

      • startOfWeek

        public DateDiffExpression startOfWeek​(DayOfWeek startOfWeek)
        The start of the week. Used when unit is week. Defaults to Sunday.
        Parameters:
        startOfWeek - the start of the week
        Returns:
        this
      • timezone

        public DateDiffExpression timezone​(Expression timezone)
        The timezone to carry out the operation. must be a valid expression that resolves to a string formatted as either an Olson Timezone Identifier or a UTC Offset. If no timezone is provided, the result is displayed in UTC.
        Parameters:
        timezone - the timezone expression
        Since:
        2.3