Skip to content
Advertisement

Subtraction of dates in seconds in JavaScript

I have a form with mathematical operations, the user has the right to select two dates and perform a subtraction operation. To do this, I need to translate each date into seconds and read the seconds.

I cant get seconds with date format like this

JavaScript

Advertisement

Answer

Convert the invalid date string on the server or like this

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement