RE: What is the Syntax for inserting a Javascript Date into a Search in SuiteScript?

var start = new Date(2019, 0, 1);
var end = new Date(2019, 0, 31);
var itemsSearch = searchModule.create({
    type: 'salesorder',
        ['type', 'anyof', 'SalesOrd'],
        ['datecreated', 'within', start, end],

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?

nathanw Beginner Asked on September 11, 2019 in SuiteScript.
Add Comment
2 Answers

Dates in filters need to be strings in ‘D/M/YYYY’ format

Intermediate Answered on September 11, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.