AnsweredAssumed Answered

Date Comparison between SF and SQL Server

Question asked by vvelpula087283 on Aug 9, 2018
Latest reply on Aug 13, 2018 by vvelpula087283

I have a process where I need to compare date fields queried from Salesforce and SQL Server and process logic if one is greater than the other or vice versa. I am struggling with the format difference. I have the following code in a custom scripting function

 

if (ItemCreatedDateTime > CommLastProcessedDateTime) {
CommLineCreateFlag = 0;
}
else {
CommLineCreateFlag = 1;
}

 

ItemCreatedDateTime is the value coming out of Salesforce and is seen in the format '2018-07-18T23:11:00.000Z' when I lookup the incoming document in process reporting. 

 

CommLastProcessedDateTime is process property that I initialize with a datetime value after querying SQL server. The value there is in the '2018-08-09 09:00:24.233' format.

 

Do I need to do any conversion in Boomi or use a different format when querying SQL server in order to compare with the SF value? Please help!

 

Thanks in advance. 

Outcomes