41

I want to speak to a soap service that has a date parameter which is required to be the CCYYMMDD format.

What is its definition?

k0pernikus
  • 60,309
  • 67
  • 216
  • 347

5 Answers5

48

It's just another way of writing yyyyMMdd.

The CC part represents the century, while YY is the two-digit year.

sp0gg
  • 3,722
  • 1
  • 17
  • 20
Alex Tartan
  • 6,736
  • 10
  • 34
  • 45
  • I am converting ISO PAIN 001 to EDI 820 and it uses ccyy format but when I convert it, it shows 20180719, means it is today's date. Why it did not convert to 2118? Thanks in advance. – Jayveer Parmar Jul 19 '18 at 19:03
  • 4
    When using the `GJChronology` (Gregorian/Julian calendar) then `CC` is "one off", but default is the `ISOChronology`, just `year/100` - kind of strange and hidden: see [field reference](http://joda-time.sourceforge.net/field.html#CenturyOfEra_and_YearOfCentury) – user85421 Aug 02 '18 at 10:04
25

It means yyyyMMdd, as in year (4 digits), month (2 digits, leading zero) and day (2 digits, leading zero).

So the ISO 8601 date 2014-01-05 is represented as CCYYMMDD as 20140105.

k0pernikus
  • 60,309
  • 67
  • 216
  • 347
11
CC means Century (Century 0 is the 1st Century)
YY means Year
MM means Month
DD means Day

So for current date: 29/10/2015

  • CC : 20

  • YY : 15

  • MM : 10

  • DD : 29

tread
  • 10,133
  • 17
  • 95
  • 170
9

We are in century 21; not century 20. But they mean to write the year in a 4 digit format, so technically is yyyy. So technically ccyy is wrong. So if you are born in 1990, using the ccyy format is 2090, since 1990 is in the 20th century. But if you have to write a year, you have to assume that they are asking for yyyy, not ccyy. So for example, if you are born in 1990, and they ask you in ccyy, do not write 2090 (although technically is correct) instead write 1990. Assume they want the year in 4 digit format, not the century and 2 digit format year.

Aakash Patel
  • 549
  • 5
  • 19
Javier
  • 107
  • 1
  • 1
  • It's technically wrong. The 12th hour of the day - for example - is from 11:00 to 11:59. Similarly, the current century is always CC + 1 – Peter Chaula Oct 09 '18 at 06:43
  • Century number 0 is the 1st century. Century number 20 is the 21st century. – tread Feb 23 '22 at 10:09
6

CC in CCYYMMDD date format indicates how many centuries are finished for particular year

ex.

  • year 90 has 0 centuries finished but it's placed in 1st century,
  • year 1980 has 19 centuries finished but it's placed in 20th century,
  • year 2018 has 20 centuries finished but it's placed in 21th century,

So CCYY is equal to YYYY but in another way of writing

Kristof
  • 87
  • 1
  • 3
  • The year 2021(SYSDATE) has 20 centuries finished but when you run your logic (following query), it tells you that 21 centuries are finished. `select TO_CHAR(TRUNC(SYSDATE)+55,'CCYY') from dual;` – Deep Nov 09 '21 at 18:52