cancel
Showing results for 
Search instead for 
Did you mean: 

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

donepr
New Contributor

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 5

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