To show the correct year in your date, use the DateTime format dd-mm-rrrr
.
When dates are stored in one century but refer to another century, dates can be shown with the wrong prefix. The rrrr
year format works as so;
If the specified two-digit year is 00 to 49, then
If the last two digits of the current year are 00 to 49, then the
returned year has the same first two digits as the current year.
If the last two digits of the current year are 50 to 99, then the
first 2 digits of the returned year are 1 greater than the first 2
digits of the current year.
If the specified two-digit year is 50 to 99, then
If the last two digits of the current year are 00 to 49, then the
first 2 digits of the returned year are 1 less than the first 2 digits
of the current year.
If the last two digits of the current year are 50 to 99, then the
returned year has the same first two digits as the current year.
I came across a similar issue with BOXI 3.1 and Oracle.
After creating a number of tables with Date fields with the DateTime format as dd/mm/yyyy
, and building a universe with this format in mind, I noticed on testing that some of the date results were displaying incorrectly e.g. 01/07/1993
was displaying as 01/07/2093
. This was due to the data being loaded into the table having only 2 yy
digits e.g. 01/07/93
where as Oracle was expecting a DateTime format with 4 yyyy
digits.
In turn, Oracle was forcing the year format into 4 digits but as the year was in the last century (20th) but stored in the 21st Century, the wrong century was prefixed onto the year.
To solve, I used the rrrr
DateTime Format for the year. Full explaination from Oracle at this link, and further explaination can be found here.
When I recreated the table with the DateTime format as dd-mm-rrrr
, the date displayed correctly.
I hope this helps.