How to compare the date part alone from a date time value

Try clearing the time using Date.setHours:

dateObj.setHours(hoursValue[, minutesValue[, secondsValue[, msValue]]])

Example Code:

var today = new Date();
today.setHours(0, 0, 0, 0);
d = new Date(my_value); 
d.setHours(0, 0, 0, 0);

if(d >= today){ 
    alert(d is greater than or equal to current date);
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)