Salesforce Origin incorrectly converting date into datetime

asked 2020-07-14 20:07:27 -0500

zac gravatar image

updated 2020-07-14 20:08:14 -0500

I have configured a Salesforce stage to read from the Salesforce Account object. The Account.LastActivityDate field has a data type of date, not datetime. When retrieved by the stage it appears to have been converted into a datetime (with the incorrect time).

For example, if the Salesforce field value is 9/14/2017 then the SDC Field value: LastActivityDate=Field[DATETIME:Wed Sep 13 18:00:00 MDT 2017] (MDT is our timezone)

When the value is inserted into the database I see: 9/13/2017 6:00:00 PM.

Is this a bug in the stage? In the JDBC Producer I found I can use something like: "paramValue": "SUBSTR(cast(? as DATE) + 1,0,10)" to convert the date strings, but it seems like a hack to me and dependendant upon the system timezone.

edit retag flag offensive close merge delete