Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
var d = new Date();
           var weekday = new Array(7);
           weekday[0] = "Sunday";
           weekday[1] = "Monday";
           weekday[2] = "Tuesday";
           weekday[3] = "Wednesday";
           weekday[4] = "Thursday";
           weekday[5] = "Friday";
           weekday[6] = "Saturday";
           var n = weekday[d.getDay()]; alert(n); return false;





like this i need 18/05/2016 how i can find this date which date using javascript
Posted

This looks basically correct. So what is the issue ?
 
Share this answer
 
Comments
satheeshkumar chinnadurai 23-Jan-14 2:43am    
18/05/2016 this date which day
Christian Graus 23-Jan-14 2:55am    
Oh, I see. You didn't tell us what the actual issue was. Someone else managed to read your mind.
satheeshkumar chinnadurai 23-Jan-14 3:00am    
k sir
JavaScript
var d=new Date(2016, 4, 18); // months are zero based!!!
// or var d=new Date("05/18/2015"); // order!!!
var weekday=new Array(7);
weekday[0]="Sunday";
weekday[1]="Monday";
weekday[2]="Tuesday";
weekday[3]="Wednesday";
weekday[4]="Thursday";
weekday[5]="Friday";
weekday[6]="Saturday";

var n = weekday[d.getDay()];
 
Share this answer
 
Comments
satheeshkumar chinnadurai 23-Jan-14 2:53am    
var d=new Date("05/18/2015");this one correct output giving thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900