cancel
Showing results for 
Search instead for 
Did you mean: 

Unix time convert to SAP

Former Member
0 Kudos

Hello All,

i wrote one UDF to convert the Unix time to SAP.

long unixTime = Long.parseLong(Time);

String date = new java.text.SimpleDateFormat("yyyymmdd HH:mm:ss").format(new java.util.Date (unixTime*1000));

return date;

its not working for some unix time data like

unix : 1357476527   Output : 20134806 15:48:47

kindly help me if i was worng in writing the code.

Regards,

chinna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

String date = new java.text.SimpleDateFormat("yyyyMMdd HH:mm:ss").format(new java.util.Date (unixTime*1000)); will resolve it. Please check.

Regards,

Beena.

Answers (0)