suiteql query to compare trandate with with today
# ask-stanley-ai
n
suiteql query to compare trandate with with today
c
AI generated answer (using internal Slack threads):
To compare
trandate
with today's date in SuiteQL, you can use the
CURRENT_DATE
function. Here is an example of how you can do it:
Copy code
sql
SELECT * FROM transaction 
WHERE type = 'SalesOrd' 
AND TRUNC(trandate) = CURRENT_DATE
In this query,
TRUNC(trandate)
is used to remove the time part from the
trandate
and
CURRENT_DATE
is used to get the current date. This will return all sales orders where the
trandate
is today. ****** 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.779492
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.7794348
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.778581321
Please provide your feedback on this answer.