Hi,
I am writing a script to check a event date field with current date and if it is less than or equal to day, I am trying to do something with the other fields.
But my script is not working as expected. I did debug the script to check if I am getting the correct dates and seems to be fine. The condition which checks for less than or equal to seems to be ignored even if the date field has a date that is less than today.
Can somebody please guide me through this?
Here is my script:
if(results!=null){
var dateTimeValue=results.value[0].new_datetime;//On debug, this is the date that I am getting 2018-05-08T13:30:00Z
var today=new Date();//today's date Mon May 14 2018 09:50:50 GMT-0400(Eastern Daylight Time)
if(eventdateTimeValue<=today){
//do something
}
}
Thanks for any help.
*This post is locked for comments
I have the same question (0)