Forum Discussion

donepr's avatar
donepr
New Contributor
8 years ago

Date Timestamp error while trying to use the "sql server update" snap?

Hi All,

I’m trying to update the target sql server table using “sql server update” snap with the where condition “INSERTTS = $INSERTTS” (INSERTTS is the insert date timestamp) but I’m getting the error

Failure: Type class org.joda.time.LocalDateTime is not supported in dialect DEFAULT, Reason: Failed to execute SQL Server Snap, Resolution: Please address the reported issue.

The INSERTTS column in the source table has values in the format shown below

2014-07-22 15:56:13.000
2014-07-22 15:57:48.000
2014-07-22 15:58:34.000
2014-07-17 13:51:07.000
2014-07-22 16:00:05.000
2014-07-22 16:04:51.000
2014-07-23 06:26:40.000
2012-06-15 10:49:43.000
2012-06-15 10:56:20.000
2014-07-23 11:17:07.000
2014-07-22 14:16:01.000
2014-07-22 14:17:08.000
2014-07-22 14:17:56.000

5 Replies

    • donepr's avatar
      donepr
      New Contributor

      Yes I did. I tried to use every date conversion formula but its throwing the same error.

      • jonesky's avatar
        jonesky
        New Contributor

        Did you ever figure this out? The date time formats for SQL server are not compatible from what I can find.

  • Any word on this? I know this is an old thread, but I’m currently seeing the error, too.

  • alchemiz's avatar
    alchemiz
    Contributor III

    Hello,

    I think you might want to add a single quote… e.g.

    "INSERTTS = '" + $INSERTTS + "'"
    
    or if the format is the issue...
    
    "INSERTTS = '" +  Date.parse($INSERTTS).toLocaleDateTimeString({"format": "yyyy-MM-dd HH:mm:ss.SSS"}) + "'"
    
    

    Thanks,
    EmEm