Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to compare Date & time

Status
Not open for further replies.

yash

Programmer
Apr 9, 2001
46
IN
Hi,
How can we compare Date Only
And also Time Only with Javascript..
Regards..
 
You use the corresponding date & time methods.

var today=new Date()

var date=today.getDate()
var time=today.getTime()

var hour=today.getHours()
var minute=today.getMinutes()
var second=today.getSeconds()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top