I need to compare two timestamp values one is retrieving from the database and the other is the constant date which is the default value.
var userdate = doc.data().Subscriptionenddatefrombackend;// the value here I am getting is : 2020-03-02T09:49:05.000Z
var settingdate = new Date('2019/03/04'); // the value here I am getting is : 2019-03-04T00:00:00.000Z
if(settingdate < userdate){
console.log("new user") // the code enters into this loop instead of else loop why?
}
else{
console.log("old user") // should print this line
}