You need to sign in to do that
Don't have an account?
> LAST_N_DAYS:n not working in SOQL
If I am using below Query
SELECT CaseNumber from Case where ClosedDate > LAST_N_DAYS:31
To get all case numbers which have been closed within last 30 days , It is not giving any result , even though Some cases exist in Database closed within the 30 days.
I could not understand , why I am not getting correct result.
Thanks
Yogendra Rishishwar
SELECT CaseNumber from Case where ClosedDate > LAST_N_DAYS:31
To get all case numbers which have been closed within last 30 days , It is not giving any result , even though Some cases exist in Database closed within the 30 days.
I could not understand , why I am not getting correct result.
Thanks
Yogendra Rishishwar
Try this
All Answers
Try this
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
I am trying to use custom label value in SOQL Query. Query is not accepting custom label value. it is expecting number.
Integer num_days = Integer.valueOf(System.Label.Num_of_Days);
Select id, name FROM contact WHERE LastModifiedDate >= LAST_N_DAYS :num_days
Thanks,
Anil Kumar
Try to convert to String and do it.
Thanks