RE: What is the Syntax for inserting a Javascript Date into a Search in SuiteScript?
Answered
var start = new Date(2019, 0, 1);
var end = new Date(2019, 0, 31);
var itemsSearch = searchModule.create({
type: 'salesorder',
filters:
[
['type', 'anyof', 'SalesOrd'],
'AND',
['datecreated', 'within', start, end],
],
columns:
[....]
});
I am trying to add dynamic dates to a Search. Is this the correct Syntax for adding a javascript Date as a parameter to the search?
Dates in filters need to be strings in ‘D/M/YYYY’ format