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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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