Today's Date | Sololearn: Learn to code for FREE!

0

Today's Date

How to get today's date using jQuery?

7/5/2017 3:04:37 AM

JULIAN ANTHONY

7 Answers

New Answer

+3

JQuery use JS to run... when you write 'JQuery code' it's JS code usinf the JQuery library... So, everything you can do without JQuery, you can also do them with it :P

+3

JQuery doc' wrote: << The $.now() method is a shorthand for the number returned by the expression (new Date).getTime(). >> http://api.jquery.com/jquery.now/ W3School wrote: << Return the number of milliseconds since 1970/01/01 >> https://www.w3schools.com/jsref/jsref_gettime.asp Same return too as Date.now(): https://www.w3schools.com/jsref/jsref_now.asp If you want another format, look at methods of Date object: https://www.w3schools.com/js/js_date_methods.asp

+2

u can do it without jquery :< console.log(new Date())

+1

Javascript should be preferable method, if you can do it in Javascript easily, like today = new Date();

0

No need to use JQuery. Here's a jsfiddle example: http://jsfiddle.net/nCE9u/

0

is it possible to do it with JQUERY ?

0

I use var time = $ .now() but the result is not as I want