javascriptjquerymicrosoft-ajax

Formatting a date in javascript till the millisecond


We are using the following js lib from Microsoft https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js

var datetimehigh = new Date(2011,01,12,14,45,55,596);

var sDate =  datetimehigh.format("dd/MM/yyyy HH:mm:ss sss");

I cannot get the millisecond part to work.Note that format comes from Microsoft's Mvc Ajax lib.


Solution

  • It's indicated by an f:

    "dd/MM/yyyy HH:mm:ss fff"