var nowDate = new Date();
strSQL = "SELECT * FROM tbl_Holidays "
+ "WHERE tbl_Holidays.HolidayDate = " + nowDate.getDate() + "/" + (nowDate.getMonth() + 1) + "/" + nowDate.getYear() + ";"
rsKeyword = new ActiveXObject( "ADODB.RecordSet" );
rsKeyword.ActiveConnection = CONN_LOOKUPDB;
rsKeyword.Source = strSQL;
rsKeyword.CursorType = 0;
rsKeyword.CursorLocation = 1;
rsKeyword.LockType = 1;
delEmail = "non holiday email adddress";
delEmail = "current holiday email adddress";
essentially what im trying to acheive is if a record in the DB equals todays date then it is a holiday and to set the variable delEmail appropriatly!
But it never seems to work right, its like its seeing the date different to how im inputting it.
Is there something to do with it needs to be in an american format not uk or something?
Any help greatly appreciated!