Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

query.DateId

query.DateId.{|DAYS_AGO,DAYS_FROM_NOW,HOURS_AGO,HOURS_FROM_NOW,MINUTES_AGO,MINUTES_FROM_NOW,MONTHS_AGO,MONTHS_FROM_NOW,QUARTERS_AGO,QUARTERS_FROM_NOW,SECONDS_AGO,SECONDS_FROM_NOW,WEEKS_AGO,WEEKS_FROM_NOW,YEARS_AGO,YEARS_FROM_NOW|}

N/query Module
query.DateId
Enum Description: Holds the string values for supported date codes in relative dates. This enum is used to pass the date ID argument to query.createRelativeDate(options). It is also used as the value of the RelativeDate.dateId property. When query.createRelativeDate(options) is called, the enum value that you specify is set as the value of the RelativeDate.dateId property. When creating a relative date using query.createRelativeDate(options), use the values in this enum to specify a date relative to the current date. For example, to create a relative date that represents the date a certain number of days before the current date, use the DateId.DAYS_AGO enum value. To create a relative date that represents the date a certain number of months after the current date, use the DateId.MONTHS_FROM_NOW enum value. The values in this enum might look similar to the values in the query.RelativeDateRange enum, but each enum is used for a different purpose: Use query.DateId enum values to create a query.RelativeDate object using query.createRelativeDate(options). After you create this object, you can use it in query conditions that you create using Query.createCondition(options) or Component.createCondition(options). Use query.RelativeDateRange enum values directly in query conditions that you create using Query.createCondition(options) or Component.createCondition(options). Each value in the query.RelativeDateRange enum represents a date range, and you can use these values in the values parameter of Query.createCondition(options) or Component.createCondition(options). JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation utilizes the term enumeration (or enum) to describe the following: a plain JavaScript object with a flat, map-like structure. Within this object, each key points to a read-only string value.
Module: N/query Module
Sibling Module Members: N/query Module Members
Since: 2019.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=query.DateId

Example:

// Code Example 1
// Add additional code
//...
var myRelativeDate = query.createRelativeDate({
dateId: query.DateId.DAYS_AGO,
value: 2
});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1544111587.html