How to change the date format from MM/DD/YYYY to YYYY-MM-DD of a custom field only in Saved Searches.

1. Edit the existing Saved Search

2. Under Results tab > Add Formula(Text)

3. Under the Formula column: TO_CHAR({xxxx}, 'YYYY-MM-DD')

    Note: The xxxx is the internal ID of the custom date field.

4. Under the Custom Label column, enter a name here to be displayed on the search results.

5. Click Save & Run

for example


var customrecord_jj_notificationSearch = nlapiSearchRecord("customrecord_jj_notification", null,
						[
							["custrecord_jj_notification_customer", "anyof", field.internalid]
						],
						[
							
							new nlobjSearchColumn("custrecord_jj_message"),
							new nlobjSearchColumn("custrecord_jj_message_subject"),
							new nlobjSearchColumn("formulatext").setFormula("TO_CHAR({custrecord_jj_notification_date} , 'YYYY-MM-DD')").setSort(true),
						]
					);

Leave a comment

Your email address will not be published. Required fields are marked *