RelativeDate.interval

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

The interval that the relative date represents.

For relative dates that you create using query.createRelativeDate(options), the value of this property is set when that method is executed. For relative date ranges that are included in the query.RelativeDateRange enum, the value of this property is always available (for example, query.RelativeDateRange.YESTERDAY.interval).

Important:

Do not use this property explicitly in your scripts. It is available so you can see the exact date interval that is used with the query.Operator.WITHIN and query.Operator.WITHIN_NOT operators in query conditions.

Type

Object (read-only)

Module

N/query Module

Parent Object

query.RelativeDate

Sibling Object Members

RelativeDate Object Members

Since

2019.1

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/query Module Script Samples.

            // Add additional code
...
var myRelativeDate = query.createRelativeDate({ dateId: query.DateId.WEEKS_AGO, value: 2
}); var theInterval = myRelativeDate.interval;
...
// Add additional code 

          

Related Topics

query.Query
N/query Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices