var cudate=new Date(); //gets the current date and time
var date=nlapiDateToString(cudate); //gets the current date excluding the time
comparetime="12:00:00" //specified time of the day
var compareDateTime = new Date(date+' '+comparetime); //concatenating current date and the comparison time
if(cudate >compareDateTime) // comparing current date/time with the defined date and time=12:00pm
{
//do this
}
No comments:
Post a Comment