cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes
View Entire Topic
GauravKant
Contributor
0 Likes

Hi Kavitha,

please try using below UDF . have attached output screenshot also.

please check if it is feasible for you.

i am wondering why X timezone is not working with UDF, while same is working in eclipse.

Code:

try{

String D=var1;

DateFormat converter = new SimpleDateFormat("dd-MM-yyyy");

Date dt=(Date)converter.parse(D);

DateFormat converter1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ:00");

converter1.setTimeZone(TimeZone.getTimeZone("PST"));

D=converter1.format(dt);

return D;

}

catch(ParseException e)

{

e.printStackTrace();

}

return null;

Mapping:

Output: