IT Process Automation

 View Only

CA PAM::.Javascript::. getMilliseconds() Method 

Mar 24, 2017 10:00 AM

getMiliseconds()

 

Overview - definition

 

Returns the second (from 0-999)

 

Usage

The getMiliseconds() method returns the miliseconds (from 0 to 999) of the specified date and time.

 

 

Results

A Number, from 0 to 999, with a milisecond

Examples

 

var vDate = new Date();
var vMiliseconds = vDate.getMiliseconds();

 

var vdate = new Date("March 24, 2017 10:14:13");
var vhour = vdate.getMinutes();

//the results of vhour will be 14

 

function LeftZero(vtemp, dec) {

while (vtemp.toString().length < dec) {
        vtemp = "0" + vtemp;
    }

    return vtemp;
}

function myHour() {

    var vdate = new Date();

    var vhour = LeftZero(vdate.getHours());
    var vminute = LeftZero(vdate.getMinutes());
    var vsecond = LeftZero(vdate.getSeconds());
    var vmilisecond = LeftZero(d.getMilliseconds(), 3);

    var result = vhour + ":" + vminute + ":" + vsecond + ":" + vmilisecond;
}

 

 

know_more.png

Summary CA Process Automation 

Summary CA Service Management Community 

Service Desk Manager 15 days Implementation 

CABI:: Summary - BOXI for CA SDM 

Summary CA SDM Scoreboard 

 

 

Was useful, please leave your feedback!

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.