Home:ALL Converter>Date comparison in Javascript and SQLite

Date comparison in Javascript and SQLite

Ask Time:2014-08-27T13:12:37         Author:MobX

Json Formatter

I am trying to perform a date comparison.Following is the scenario.I am getting a response from web request in XML format and from that I am parsing a date value as "2014-07-15T09:23:08.378Z"(EST format).Now I am saving this into SQLite database using query

INSERT INTO table_name (dateValue) VALUES(DATETIME(?))",modifiedDate]

Later when trying to retrieve this save date value ,I am getting the result in the format "2014-07-02 09:23:08"(which is in DATETIME format from sqlite).Now I need to compare these two date formats (i.e "2014-07-15T09:23:08.378Z" and "2014-07-02 09:23:08").Please help me on this.Looking forward for a solution

Author:MobX,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25519340/date-comparison-in-javascript-and-sqlite
yy