cancel
Showing results for 
Search instead for 
Did you mean: 

to get gmt time

Former Member
0 Kudos

Hi

In my mapping, in need to get the GMT time and . i guess there is no standard function for that. Can anyone help me with the UDF.

i tried

String temp = temp.toGMTString();

but it gives me an error.

Thanks

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Sandeep,

first you need to find out which input and output parameter that method toGMTString();

has, output is obvisious string. If input is as well string, than you use a variable, for example a, from UDF input:

String GMT;

GMT = a.toGMTString;

return GMT;

Regards,

Udo

Answers (1)

Answers (1)

Former Member
0 Kudos

Sandeep,

This code will return the current GMT time:

return new java.util.Date().toGMTString();

Kind regards,

Koen