cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date Time conversion

former_member237514
Participant
0 Likes
3,938

Hi All,

i am getting below error using date transformation function.

Client expected :2016-01-01T00:00:00-08:00

same format i maintain in graphical mapping level below is the screen shot

but when i test the total scenario with sample data i am getting below error .

Plz give some suggestions ASAP.

Thanks

Kavitha

View Entire Topic
Former Member
0 Likes

HI Kavitha,

please change your data type for "ValidFrom" field from string to Date and try.

Regards,
Bhavin Parmar

former_member237514
Participant
0 Likes

Hi Bhavin,

In sender and receiver side structure i can able to see the data type as "String" for  "ValidFrom" field.

Below is the screen shot fyi,

Plz check end let me know any suggestions

Thanks

Kavitha

Former Member
0 Likes

Hello Kavitha,

Try with the patterns as per the below link

SimpleDateFormat (Java Platform SE 7 )

former_member237514
Participant
0 Likes

Hello Raghu,

I gone through the link which you provide earlier .

here i have one more doubt

Target excepting :1900-01-01T00:00:00-08:00

In mapping level  I applied  this syntax format  "yyMMddHHmmssZ"  010704120856-0700

i got the output like   2016-07-20T00:00:00+0000.

But here end of the of the date i need  +00:00 like this.

Can you help me this .how to get .

Thanks

Kavitha

Former Member
0 Likes

Hello Kavitha,

You dont need + 0.00 right?

Try like below

yyyy-MM-dd'T'HH:mm:ss.SS


Where SS stands for milliseconds ,you can add one more S if you wish to have 3 digit millisecond value.

former_member237514
Participant
0 Likes

Hi Raghu,

kindly find the below screenshot

I tried with adding X format Date also but i got error.

Former Member
0 Likes

Hello Kavitha,

Post the exact format required.

You need to add timezone or milliseconds.

former_member237514
Participant
0 Likes

Client expected :2016-01-01T00:00:00-08:00


in that client requirement end of the digits(-08:00) regarding Timezone.


so i need time zone formate


I got upto   2016-07-20T00:00:00+0000 but end of the digits (+0000) i need to put semicolon like +00:00


so plz suggest me how to do that


Former Member
0 Likes

Hello Kavitha,

Try either of the the below

yyyy-MM-dd'T'HH:mm:ss.SSSZ  

yyyy-MM-dd'T'HH:mm:ss.SSSXXX

former_member237514
Participant
0 Likes

Hello Raghu,

I tried with your inputs

yyyy-MM-dd'T'HH:mm:ss.SSSZ  for this output  2016-07-20T00:00:00.000+0000



yyyy-MM-dd'T'HH:mm:ss.SSSXXX for this output i am getting error like below screen shot.


Former Member
0 Likes

Hello Kavitha,

XXX is only to get timezone with Semicolon,

Can you post the screenshot with input and outputs.

former_member237514
Participant
0 Likes

plz see the below screen shot

Former Member
0 Likes

Try with a space between SSS and XXX.

former_member237514
Participant
0 Likes

No luck its not working throwing same error

Former Member
0 Likes

Strange.I dont have system to try.

Try with single X..

former_member237514
Participant
0 Likes

no it's not working same error only