Click here to Skip to main content
14,920,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 dates in string format.
31-Jul-2020 05:30
and
01-Jul-2020 05:30


I need to find the highest date. How can I compare these dates in Javascript code?

What I have tried:

I have issue converting string to date
Posted
Updated 15-Apr-21 8:02am

1 solution

Use the javascript Date parse methods, for examples see

Date.parse() - JavaScript | MDN[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900