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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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