# JIRA Cloud Sync issue - No signature of method: java.sql.Timestamp.format() is applicable for argument types:

**URL:** <https://community.exalate.com/t/jira-cloud-sync-issue-no-signature-of-method-java-sql-timestamp-format-is-applicable-for-argument-types/4475>\
**Category:** General Questions\
**Tags:** exalate, cloud-jira, migrated\_question\
**Created:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/jira-cloud-sync-issue-no-signature-of-method-java-sql-timestamp-format-is-applicable-for-argument-types/4475 "2024-11-04T07:00:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/jira-cloud-sync-issue-no-signature-of-method-java-sql-timestamp-format-is-applicable-for-argument-types/4475/1 "2024-11-04T07:00:18Z")

</div>

_Originally asked by Shaheel Luckoo on 26 November 2020 [(original question)](https://oldcommunity.exalate.com/questions/20122422)_

* * *

Hi Everyone:

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)

------------- Code --------------

import java.time.ZonedDateTime;  
import java.time.format.DateTimeFormatter;

def formatdate(dateString) {  
def inputDateString = dateString  
def inputDateFormat = “yyyy-MM-dd’T’HH:mm:ss.SSSX”  
def outputDateFormat = “d/MMM/yy h:mm a”  
def outputTZ = TimeZone.getTimeZone(‘America/New\_York’)  
def convertedDate = dateString.format(outputDateFormat, outputTZ)  
return convertedDate  
}

Can Someone help me? I am using exalate with Jira Cloud

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/jira-cloud-sync-issue-no-signature-of-method-java-sql-timestamp-format-is-applicable-for-argument-types/4475/2 "2024-11-04T07:00:19Z")

</div>

_Answer by Juan Grases on 26 November 2020_

You need to replace

```auto
def convertedDate = dateString.format(outputDateFormat, outputTZ)

```

with:

```auto
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?

> **Shaheel Luckoo commented on 26 November 2020**
>
> > ```auto
> > 
> > ```
> 
> import java.time.ZonedDateTime;  
> import java.time.format.DateTimeFormatter;
> 
> def formatdate(dateString) {  
> def inputDateString = dateString  
> def inputDateFormat = “yyyy-MM-dd’T’HH:mm:ss.SSSX”  
> def outputDateFormat = “d/MMM/yy h:mm a”  
> def outputTZ = TimeZone.getTimeZone(‘America/New\_York’)  
> /\* def convertedDate = dateString.format(outputDateFormat, outputTZ) \*/  
> def format = new java.text.SimpleDateFormat(“yyyy-MM-dd”)  
> format.setTimeZone(TimeZone.getTimeZone(‘America/New\_York’))  
> def convertedDate = format.format(dateString)  
> return convertedDate  
> }
> 
> comment.body =
> 
> “_commented by " + comment.author.displayName + " - " + formatdate(comment.created) + "_\n” + comment.body
> 
> ```auto
> 
> ```

> **Juan Grases commented on 26 November 2020**
>
> > 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

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 6, 2024, 7:00am UTC](https://community.exalate.com/t/jira-cloud-sync-issue-no-signature-of-method-java-sql-timestamp-format-is-applicable-for-argument-types/4475/3 "2024-11-06T07:00:35Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
