I use this code to find time difference,
alert(( new Date("1970-1-1 12:42 ") - new Date("1970-1-1 9:42") ) / 1000 / 60 / 60 );

it works in chrome, but in firefox it shows NaN error.
How to solve this?

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.