How to use VB6 to convert time stamp to date
1402233166999 to yyyy-mm-dd hh:nn:ss
1402233166999 to yyyy-mm-dd hh:nn:ss
Code:
var da = 1402233166999;
da = new Date(da);
var year = da.getFullYear()+'year';
var month = da.getMonth()+1+'month';
var date = da.getDate()+'day';
console.log([year,month,date].join('-'));
var time2 = new Date().format("yyyy-MM-dd");
console.log(time2);
var da = 1402233166999;
date2 = new Date(da).format("yyyy-MM-dd");
how to use date format by MSScriptControl?