Suitescript to Format Date according to the Date Format set in the NetSuite Account

define([‘N/log’, ‘N/config’, ‘N/format’],     /**  * @param{format} format  * @param{log} log  */     (log, config, format) => {         /**          * Defines the Scheduled script trigger point.          * @param {Object} scriptContext          * @param {string} scriptContext.type – Script execution… Continue reading Suitescript to Format Date according to the Date Format set in the NetSuite Account

Converting Date to d/m/yyyy format

Scenario: Convert given date to the d/m/yyyy format Solution: You need to use the module ‘N/format‘ to convert the date to different formats. format.parse method can be use for this. It parses a value from the appropriate preference format to its raw value. The appropriate preference format is the one selected in the Date Format… Continue reading Converting Date to d/m/yyyy format