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
- Create a custom report using the Format Code: YYYY-MM-dd.
- Schedule a class with a start date of 31 December 2024
- Observe that the CLASSSTARTDATE in the report is showing as 31 December 2025.
- Change the Format Code to yyyy-MM-dd.
- 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)
yyyyrepresents the calendar year.- It starts from January 1st and ends on December 31st.
- Example:
2024-12-31→ December 31, 20242025-01-01→ January 1, 2025
2. YYYY-MM-dd (Week-Based Year)
YYYYrepresents 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 withYYYY-MM-dd, if it falls in the first week of the next year:
→2025-12-31(2025week-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
SAP Knowledge Base Article - Public