Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
ODBC date math
Hi,
I have a custom record that contains a timestamp field called publish_date. I want to find the difference between sysdate and publish_date and I have been unable to perform this operation through the odbc driver.
Option 1) Use systimestamp
select systimestamp - publish_date from myrecordtable
ERROR: [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK
SQL Engine]Column:systimestamp not found.[10125]
Option 2) Cast sysdate and publish_date to date
select cast(sysdate as date) - cast(publish_date as date) from myrecordtable
ERROR: [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK
SQL Engine]Incompatible value type specified for column:CAST(sysdate())-CAST(publish_date).
0