I started having this issue after 2 years that the code has been in place and working.
No signature of method: java.sql.Timestamp.format() is applicable for argument types: (String, sun.util.calendar.ZoneInfo) values: [d/MMM/yy h:mm a, sun.util.calendar.ZoneInfo[id=“America/New_York”,offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]] Possible solutions: toYear(), from(java.time.Instant), from(java.time.Instant)
def format = new java.text.SimpleDateFormat(outputDateFormat)
format.setTimeZone(TimeZone.getTimeZone('America/New_York'))
def convertedDate = format.format(dateString)
Comments:
Shaheel Luckoo commented on 26 November 2020
Thank you Juan. It’s working. Youpie
Shaheel Luckoo commented on 26 November 2020
Hi Juan:
I got another error:
No signature of method: java.sql.Timestamp.format() is applicable for argument types: (String, sun.util.calendar.ZoneInfo) values: [d/MMM/yy h:mm a, sun.util.calendar.ZoneInfo[id=“America/Los_Angeles”,offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]] Possible solutions: toYear(), from(java.time.Instant), from(java.time.Instant)
Shaheel Luckoo commented on 26 November 2020
This time a different TimeZone. How can I proactively cater for all TimeZones?
Thanks for your help
Juan Grases commented on 26 November 2020
This looks like you need to do the same fix but in another line. Could you share the line that is failing?
I don’t thin the error is coming from that code as you are not doing java.sql.Timestamp.format(), are you sure the error is not from another connection or that the error is not for another line of code?
Shaheel Luckoo commented on 26 November 2020
Everything good. I forgot to amend the target. Thanks again for your help