Does NetSuite SuiteScript 2.1 search support datet...
# ask-stanley-ai
j
Does NetSuite SuiteScript 2.1 search support datetime filtering on the lastmodifieddate field or does it only support filtering based on the date alone?
c
AI generated answer (using internal Slack threads):
Based on the conversations provided, it appears that NetSuite SuiteScript 2.1 search does not directly support datetime filtering on the
lastmodifieddate
field. The error message
SSS_INVALID_SRCH_FILTER
indicates that the
formuladatetime
filter is not valid. However, there are workarounds to this limitation. One of the users suggested using SQL functions and a
formulanumeric
filter. Another user suggested using the
TO_DATE
function in a SuiteQL query to filter by date and time. Here is an example of how you might use this function:
Copy code
WHERE lastmodifieddate >= TO_DATE( '2020-11-24 00:00:00', 'YYYY-MM-DD hh24:mi:ss' )
This function converts a string to a date, allowing you to filter by both date and time. If you only need to filter by date, you can use the same function with a different format string:
Copy code
WHERE lastmodifieddate >= TO_DATE( '2020-11-24', 'YYYY-MM-DD' )
Please note that these are workarounds and may not be suitable for all use cases. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.850524962
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845214844
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844299316
Please provide your feedback on this answer.