I have two dates
var date1="2015-09-18 06:08:50";
var date2="2015-09-18 06:08:51";

I am suffering to get greater one date2.
any body help me.

Recommended Answers

All 2 Replies

If you make then Date objects can you not use comparison operators - eg >, < etc?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.