0

Hi I would like to ask anyone if how can I format my date into this format yyyy-mm-dd. Currently I'm having this format Sat Feb 08 2014 08:00:00 GMT+0800 (China Standard Time)

Here is my code for my date format:

var ss = new Date(rangeTo);  //Where rangTo is a textbox
var newss = new Date(ss.setDate(ss.getDate() + 1));
  • http://blog.justin.kelly.org.au/simple-javascript-function-to-format-the-date-as-yyyy-mm-dd/ – George Apr 15 '14 at 07:47

1 Answers1

0

JavaScript has fairly limited capbilities for formatting dates, so I recomment using something like moment.js

ced-b
  • 3,957
  • 1
  • 27
  • 39