Skip to Content

convert time from gmt to cet in SAP PO Mapping


I have a requirement where incoming time will be (08:30:00.000+01:00) and I need to send output as 09:30:00

I need udf to convert GMT to CET .

Any help ?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 28, 2017 at 01:55 PM

    In short, you can create an UDF using Java SimpleDateFormat. Bear in mind that when converting, you can eventually have to change the day (in case that you also have one field specifically for date)

    The code should be something like this:

    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());
    SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss.sss X"); //X is the ofrmat you are using at your example
    //Initial timezone. 
    //Target timezone
    //Will set CET Timezone
    Add comment
    10|10000 characters needed characters exceeded