'RRRR' versus 'YYYY' - Coddicted

‘RRRR’ versus ‘YYYY’

The RRRR date format was provided to help people cope with Y2K issues. If the format is RR or RRRR and a two-digit year is given, then the year will be assumed to be prepended with ’19’ if the given year is between 50 and 99, or it will be assumed to be prepended with ’20’ if the given year is between 0 and 49. The RRRR format will accept both two and four digit years.If you give it a four digit year, no assumptions are made.
 
RRRR1
 
Notice that this differs from the behavior of the ‘YYYY’ format. No matter which year we gave it, it assumed to prepend with ’00’ for the century.
 
RRRR2
 
 
Where as the YY assumed the current century
 
RRRR3
 

Back To Top
Rate this post

Leave a Reply