SAP Knowledge Base Article - Public

3558248 - Date formatting difference with YYYY-MM-dd and yyyy-MM-dd in PRD reports

Symptom

The date format in a custom report displays an incorrect year when using the format code YYYY-MM-dd, showing a year ahead. However, using the format code yyyy-MM-dd, displays the year correctly.

Environment

SAP SuccessFactors Learning

Reproducing the Issue

  1. Create a custom report using the Format Code: YYYY-MM-dd.
  2. Schedule a class with a start date of 31 December 2024
  3. Observe that the CLASSSTARTDATE in the report is showing as 31 December 2025.
  4. Change the Format Code to yyyy-MM-dd.
  5. Observe that the CLASSSTARTDATE in the report is now showing as 31 December 2024.

Cause

In Plateau Report Designer, "YYYY-MM-dd" and "yyyy-MM-dd" are date format codes. The difference usually lies in how the year is interpreted: 

"YYYY": often signifies a week-based year. 

"yyyy": typically represents a calendar year. 

Resolution

Here’s a detailed explanation:


1. yyyy-MM-dd (Calendar Year)

  • yyyy represents the calendar year.
  • It starts from January 1st and ends on December 31st.
  • Example:
    • 2024-12-31 → December 31, 2024
    • 2025-01-01 → January 1, 2025

2. YYYY-MM-dd (Week-Based Year)

  • YYYY represents the ISO week-based year, which can differ from the calendar year.
  • The week-based year starts on the Monday of the first week that contains at least 4 days of the new year.
  • Example:
    • If January 1st falls on a Friday (less than 4 days in the new year week), the first few days of January will be considered part of the previous week-based year.
    • Similarly, if December 31st falls early in a week, it can be part of the next week-based year.

So, if you give the format as YYYY then it considers as week-based year

How the Date Changes

In PRD application where YYYY-MM-dd is used, dates around the end of December and the start of January can behave differently. For instance:

  • December 31, 2024 (yyyy-MM-dd) → 2024-12-30
    But with YYYY-MM-dd, if it falls in the first week of the next year:
    → 2025-12-31 (2025 week-based year)

  • This can cause unexpected results in reporting, scheduling, or date-based processing if the wrong format is used.

Therefore, use yyyy-MM-dd for regular date handling unless you specifically need week-based year processing 

See Also

Refer to Knowledge Article 2476697 - Date and time formatting in SAP SuccessFactors Learning Reports

Keywords

Date format, custom report, calendar year, week-based year, YYYY, yyyy, CLASSSTARTDATE, SAP SuccessFactors Learning, PRD, date format, preview, YYYY-MM-dd, yyyy-MM-dd , KBA , LOD-SF-LMS-CRI , Custom Report Issues , How To

Product

SAP SuccessFactors Learning all versions