Forums

Full Version: How to get date, month and year from a complete date?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
new Date() will give the complete current date with time..

var today = new Date();
var today1=today.getFullYear()+'-'+(today.getMonth() + 1)+'-'+today.getDate();