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!
SQL Essentials: TRUNC(DATE) Function Explained
Overview
The TRUNC(DATE) function in Saved Search Formula is used to truncate a date to a specified unit, effectively setting all smaller units to their default values. In simpler terms, it allows you to round down a date to the beginning of a specific time period, such as the start of a month or year. This is particularly useful in NetSuite's Saved Searches when you need to group or filter data by specific time frames.
Understanding the Syntax
The TRUNC(DATE) function is structured as follows:
TRUNC(date, format)
- date: The date value you want to truncate.
- format: A string that specifies the unit to which the date should be truncated.
Learn how to Refer A Member | Earn the Answer Accepter Badge | Be the Content Creator of the Quarter | Vote for the content you want to see!
Tagged:
0
