View Single Post
  #1108  
Old 27.02.2020, 11:09
zreenmkr zreenmkr is offline
JD Addict
 
Join Date: Feb 2020
Posts: 174
Default

Code:
var myDate = function() {
    var t = new Date();
    var year = t.getFullYear();
    var month = ("0" + (t.getMonth() + 1)).slice(-2);
    var date = ("0" + t.getDate()).slice(-2);

    return [year, month, date].join("-");
}

alert(myDate());
Sweet, thanks!!


Quote:
Only the mods have access to the attachment. I have tested both scripts using comparision operator and they are working correctly.
here is the attached on public imgur. See both scripts executed when Button 1 is pressed

screenshots

Last edited by zreenmkr; 27.02.2020 at 12:37.
Reply With Quote