11-11-2018 06:02 PM
Hello - I am new to snaplogic and working on a SFDC read SOQL statement. I need to insert the Date.Now() function in the SNAP SOQL.
For example
Select d.Id, From Deployment_Contact__c d where d.Contact__c != null and d.Deployment__r.Customer__c != null and (date.Now() > 2014-10-18T00:05:12.000+0000 or d.Deployment__r.LastModifiedDate > Date.Now())
Is this possible ?
11-13-2018 08:42 AM
If you toggle the equals sign button next to the text field for the SQL query, the field becomes an expression and you can use the expression language to dynamically construct the query. Is that what you want?
11-13-2018 10:00 AM
@akelpe - yes that was one of the issues but also i got some help the expression below worked for me,
Date.now().toLocaleDateTimeString(‘{ “format”:“yyyy-MM-dd”}’)+“T”+Date.now().toLocaleDateTimeString(‘{ “format”:“HH:mm:ss”}’)+“Z”