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’: The Year spelled out
‘YY’: Last 2 digits of year
‘IYY’: Year according to ISO standard
‘Q’: Quarter of year (1, 2, 3, 4; JAN-MAR = 1)
‘MM’: Month (01-12; JAN = 01)
‘MON’: Abbreviated name of month
‘MONTH’: Name of month, padded with blanks to length of 9 characters
‘RM’: Roman numeral month (I-XII; JAN = I)
‘WW’: Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year
You can also use ‘HH24:MI’ to get the time in 24-hour format.
For example, TO_CHAR({datecreated},’MM/DD/YYYY HH24:MI:SS’) would return the date and time in the format MM/DD/YYYY HH24:MI:SS. For the 12-hour(AM/PM) format, use: TO_CHAR({datecreated},’MM/DD/YYYY HH:MI:SS AM’)
N.B: Make sure to use the formula inside a ‘Formula(Text)’ field.