Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am able to convert it into UTC timezone, but i need to convert it into PST timezone which is 8 hours less than UTC timezone.
This is what i am doing as of now :-
TalendDate.formatDateInUTC("yyyy-MM-dd HH:mm:ss",TalendDate.getCurrentDate())
Any immediate help would be appreciated!
Thanks!
Hello @aagnihot
Use a tJava and set your local timezone before your date transformation.
- Go to tjava 'advanced Setting' and import the TimeZone library :
import java.util.TimeZone;
- Go back to 'basic settings' => Set the timeZone you wish and use the TalendDate.formatDate function :
TimeZone.setDefault(TimeZone.getTimeZone("PST"));
TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",TalendDate.getCurrentDate());
Regards,
Pierre