0

I wanted to know how can I get todays date in as July 17,2014 format. I am new to javascript..

please help

but I have tried using var today = new Date();..but it gives me current date and not in the format I want.

Bhushan Kawadkar
  • 28,279
  • 5
  • 35
  • 57
user3818870
  • 25
  • 1
  • 9
  • Please do some research before posting a question. You can find this info on Google easily, and there are dozens of duplicates here on StackOverflow. Type the exact title of this question on Google, you'll see. – elclanrs Jul 17 '14 at 05:43
  • Sorry am new to javascript..Got the answer..Thanks – user3818870 Jul 17 '14 at 06:48

1 Answers1

1

Try to make use of following method of Date in javascript:

getFullYear(); // 2011
getMonth(); // 0-11, 0-based month in year,
getDate(); // 0-31, 1-based day of month,
Eric
  • 22,183
  • 20
  • 145
  • 196