cancel
Showing results for 
Search instead for 
Did you mean: 

DATE FORMAT ccyymmdd

Former Member
0 Kudos

Hi all,

I am doing EDI message to IDOC mapping in which My requirement is to map

Current date -


>DATUM

in this mapping current date should be in the format ccyymmdd

If i give this format in function current date then it gives rumtime error that C is illegal character

It only accepts y, m and d characters

any body can tell me how can i give this CCYYMMDD format in current date function?

Thanks

Sandeep sharma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

you can treat the CCYY as YYYY as CC defins the century 19 and YY defins the year. so both are same

in XI u can use the dtae format of typr YYYYMMDD for CCYYMMDD.

Thanks

Rinku

Former Member
0 Kudos

i know both are same just a slight diffencer in way of representation

My requirement is to give date in format CCYYMMDD format not in year format

If you give the date 20080428,it treats 20 as CC (century) and 08 as Year 04 as month 28 as date.

So you can use the same format.

Former Member
0 Kudos

Dear Sandeep,

In JAVA date manipulation classes (SimpleDateFormat, DateFormat), the "CC" pattern (century) does not exist ...

As Rinky says, YYYYMMDD would be the easier way of representing such date ... Otherwise you'll have to explain us why do you need to stick to this CC thing (ie, "CCYYMMDD" today date should be "21080428" ?)

Rgds

Chris

Answers (7)

Answers (7)

adalid
Participant
0 Kudos

As mentioned, CC is referring to Century, in message mapping there is not such as CCYYMMDD option, so instead of it, you can use following tip... use DateTrans function and set it up as yyyyMMdd, then use substring 2...8 and concat with 21 so you will get 21220814.

Regards.

Adalid Andrés.

Former Member
0 Kudos

CCYYMMDD was obviously invented by mentally handicapped people. Correct would be YYYYMMDD, CC (century) is year (integer divide by 100) + 1. Sometimes the stupids win.

vijay_b4
Active Contributor
0 Kudos

HI Sandeep,

CC means century.

XI does not understand the format CCYYMMDD.so you can give YYYYMMDD.

Regards

Vani.

former_member556603
Active Contributor
0 Kudos

Hello Sandeep,

You Fallow Like this YYYYMMDD (20080428)

CC (century).

Thanks,

Satya Kumar

Former Member
0 Kudos

hi

Xi can not identify the CCYYMMDD

he identify yyyymmdd

you can give the date in YYYYMMDD this format

thanks'

Regards

vijay

aashish_sinha
Active Contributor
0 Kudos

Hi,

SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");

Date today = new Date();

String stringDate = formatter.format(today);

System.out.println(stringDate);

You just need to change the format pattern as listed in the docs for different formats.

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

hi sandeep,

Could tell what does CC in CCYYMMDD means.

and also give us the details on the receiver side datatype for the date.

Regards,

Ramesh P