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
Need to Calculate Hours between two times with a twist
I am trying to calculate the hours between two times in a saved search. I have that part down but what I don't have down is one requirement. If the first date is after 3:00 on a weekday then I need to measure the time between 6:00 am the next weekday and the second time. Here is what I have
CASE WHEN TO_CHAR({custbody_ready_for_approval},'D') BETWEEN 2 AND 6 AND TO_CHAR({custbody_ready_for_approval},'HH24' ) < 15 THEN regexp_substr(substr({custbody_ready_for_approval}-{custbody_approval_date_},instr({custbody_ready_for_approval}-{custbody_approval_date_},' ')+1), '^[^:]*') ELSE
0