Change date format in a NetSuite saved search result column

In NetSuite, the TO_CHAR() function can be used to convert a date object into a text representation of it. Here are some examples of date/time format values that can be used with TO_CHAR(): ‘YYYY’: 4-digit year‘IY’ or ‘IYYY’: ISO Year‘M’: Month2‘DL’: Long version of the date including day of the week, month, day, and year‘YEAR’:… Continue reading Change date format in a NetSuite saved search result column

Set the Date field in Suite Script

In Suite Script 2.0, setting date is not as simple as setFieldValue() To fix this issue,Step 1: The developer should use the “N/format” module,Step 2:  format.format() method             format.format({value: DateVariableHere, type: format.Type.DATE}),Step 3:  set this value using  setValue() //============== Use the below code for the date to date field ================ Use the parse method to parse… Continue reading Set the Date field in Suite Script

How to give a specific format pattern for a date (DD/MM/YY OR MM/DD/YYYY) in JavaScript

If we want to give a specific pattern to a date like DD/MM/YYYY or MM/DD/YYYY we can use this method. Let’s break that down and see what’s going on up there. Again, we have wrapped the entire regular expression inside ^ and $, so that the match spans entire string. ( start of first subexpression. \d{1,2} matches at least 1… Continue reading How to give a specific format pattern for a date (DD/MM/YY OR MM/DD/YYYY) in JavaScript

Date format using moment.js

MomentJS is a JavaScript library which helps in parsing, validating, manipulating and displaying date/time in JavaScript. Its parsing allows you to parse the date in the format required. Parsing of date is available in the string, object and array. You can use the method isValid() and check whether the date is valid or not. MomentJS also provides… Continue reading Date format using moment.js