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.

2
  • 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. Commented Jul 17, 2014 at 5:43
  • Sorry am new to javascript..Got the answer..Thanks Commented Jul 17, 2014 at 6:48

1 Answer 1

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, 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.