Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Salesforce Input Tool error when using CloseDate

Cherkos12
7 - Meteor

I'm getting below error when i try WHERE clause (SOSQL) greater than equal. any idea how to fix this?

 

 

Cherkos12_0-1679501033901.png

 

5 REPLIES 5
apathetichell
18 - Pollux

First off - this should be a YYYY-MM-DD expression if it accepts a Date. If not - you made need to include a time using this format:

  • YYYY-MM-DDThh:mm:ss+hh:mm

see the SOQL instructions here:

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sel...

Cherkos12
7 - Meteor

Thanks. the link you shared has helpful tips. the problem is the close_date_c field comes in the format shown below, how'd i fix that?

 

CreatedDateClose_Date__c
3/2/2021 20:081/30/2023
6/29/2020 20:151/31/2023
apathetichell
18 - Pollux

What happens when you put 2023-01-30 in your where clause? can you confirm that this field is a date in Salesforce (ie in field/relationships) under the Object? 

apathetichell
18 - Pollux

When I tested this on a datetime field I used:

SELECT
LastModifiedDate
FROM
Account
WHERE
IsDeleted=False and LastModifiedDate>=2022-01-08T01:02:03Z

 

and this worked fine.

 

I have also confirmed that for a date field the format of 2022-01-01 is proper - and if you validate your query it will tell you that. Can you confirm your datefield is a date - and not a string? My suspicion is that you field in Salesforce is a string. In this case you would use todate(Close Date,dd/mm/yyyy) 

 

assuming these are strings - and not date at the Salesforce field level - you may want to have a "talk" with your Salesforce implementation team/consultant.

 

the dd/mm/yyyy may need to be in quotes - validate query will tell you.

apathetichell
18 - Pollux

Can you mark this is a correct solution?

Labels