query.DateId
JavaScript does not include an enumeration type. The SuiteScript 2.x documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.
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 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:
|
Module |
|
Sibling Module Members |
|
Since |
2019.1 |
Values
Value |
Sets RelativeDate.dateId Property To |
---|---|
|
dago |
|
dfn |
|
hago |
|
hfn |
|
nago |
|
nfn |
|
mago |
|
mfn |
|
qago |
|
qfn |
|
sago |
|
sfn |
|
wago |
|
wfn |
|
yago |
|
yfn |
Syntax
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.DAYS_AGO, value: 2
});
...
// Add additional code