CustomFunction on the Date field

Only Year

  1. DATE_FORMAT({t}.{f}, '%Y') → Returns a 4-digit year (e.g., 2026).
  2. DATE_FORMAT({t}.{f}, '%y') → Returns a 2-digit year (e.g., 26).
  3. YEAR({t}.{f}) → A direct alternative function to extract the year as a numeric value.

Year-Month Variations

  1. DATE_FORMAT({t}.{f}, '%Y-%m') → Standard numeric year-month (e.g., 2026-08).
  2. DATE_FORMAT({t}.{f}, '%Y/%m') → Slash-separated year-month (e.g., 2026/08).
  3. DATE_FORMAT({t}.{f}, '%M %Y') → Full month name and year (e.g., August 2026).
  4. DATE_FORMAT({t}.{f}, '%b-%y') → Short month text and 2-digit year (e.g., Aug-26)

Week Variations

  1. DATE_FORMAT({t}.{f}, '%Y-%u') → Year and week number, where Monday is the first day of the week (e.g., 2026-31).
  2. DATE_FORMAT({t}.{f}, '%Y-%v') → Year and week number (ISO 8601 standard, where week starts on Monday and week 1 is the first week with 4+ days).
  3. DATE_FORMAT({t}.{f}, '%Y-%U') → Year and week number, where Sunday is the first day of the week.
  4. WEEK({t}.{f}) → A direct alternative function to extract just the numeric week number of the year.

Month-Day Variations

  1. DATE_FORMAT({t}.{f}, '%m-%d') → Numeric month and day (e.g., 08-25).
  2. DATE_FORMAT({t}.{f}, '%b %d') → Short month name and numeric day (e.g., Aug 25).
  3. DATE_FORMAT({t}.{f}, '%M %e') → Full month name and day without leading zero (e.g., August 25).
  4. DATE_FORMAT({t}.{f}, '%d/%m') → European slash format (e.g., 25/08).

Day Only Variations

  1. DATE_FORMAT({t}.{f}, '%d') → Day of the month with a leading zero (e.g., 01 to 31).
  2. DATE_FORMAT({t}.{f}, '%e') → Day of the month without a leading zero (e.g., 1 to 31).
  3. DATE_FORMAT({t}.{f}, '%W') → Full weekday name (e.g., Tuesday).
  4. DATE_FORMAT({t}.{f}, '%a') → Short weekday name (e.g., Tue).
  5. DATE_FORMAT({t}.{f}, '%w') → Day of the week as a number where Sunday is 0 (e.g., 0 to 6).
  6. DATE_FORMAT({t}.{f}, '%j') → Day of the year as a three-digit number (e.g., 001 to 366)