Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15079

how to get date time format in js by vb6?

$
0
0
How to use VB6 to convert time stamp to date
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?


Viewing all articles
Browse latest Browse all 15079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>