Display date from JS

i have some js code wich take data  from SYSATTACHMENTS table, sysmodtime field.

Vvariable is assigned the value like:

 

...
var FileDate = attach.sysmodtime;
...

 

Then i display this FileDate on form (configurationItem.g) and this looks like that:

Thu Feb 09 2017 11:32:06 GMT 0300

How can i change display format to set it like i need, for example:

2017/02/09 11:32:06

or

2017.02.09 11:32:06

...

Parents Reply
  • Verified Answer

    I found library 

    Named - upgradeCommonLib (also there is - smis_CommonLib)

    which contains a function to format the date, to  display it by  the template.

     

    FileDate = lib.upgradeCommonLib.formatDate(FileDate, "yyyy/mm/dd HH:MM:ss");

     

    Function  upgradeCommonlib contains a description about available  usage

Children
No Data