How to convert Date format on client script to match with User Date formatDescriptionIf a n implementation has to get and set the data from other table on to the current table using client script usual method is to use GlideAjax or GlideRecord(not recommended method on client script). As part of this, if a date field has to fetched from other table it will return the date from server side and date format will be (YYYY-MM-DD). Now, if a user want this date to show in form of user date format on the desired field on the client side, below method helps in achieving it.InstructionsSyntax: var currentDateObj = new Date(); var currentDateUsr = formatDate(currentDateObj, g_user_date_format); For example, 1. when passed a fixed date in form of server side date format, returns the date based on user date format var user_date = formatDate(new Date("2021-10-31"), g_user_date_format) g_form.setValue('<field_name>',user_date); 2. If date is fetched from a query(like GlideRecord/GlideAjax), date returned from query pass that date object into "new Date()" Example: var user_date = formatDate(new Date(<returnDateObj>), g_user_date_format) g_form.setValue('<field_name>',user_date);