I'm trying to exclude today's records in my calls dashlet but I'm not having any luck getting the code to work. I changed it once and lost all of my dashlets completely, so I'd rather not go through the reloading process again!
I'm trying to get the "Last 7 Days" filter to NOT include records from todays date. Here's what I've done:

In the file SugarWidgetFielddatetime.php in the include\generic\SugarWidgets directory, I changed:
function queryFilterTP_last_7_days(& $layout_def) {
if ($this->reporter->db->dbType == 'oci8') {
} elseif ($this->reporter->db->dbType == 'mssql'){
return "LEFT(".$this->_get_column_select($layout_def).",11) BETWEEN LEFT((DATEADD(dd,-9,GETDATE())),11) AND LEFT(GETDATE(),11)";
}else{
return "LEFT(".$this->_get_column_select($layout_def).",10) BETWEEN LEFT((current_date - interval '7' day),10) AND LEFT(current_date,10)";
}
}



To the following code:


function queryFilterTP_last_7_days(& $layout_def) {
if ($this->reporter->db->dbType == 'oci8') {
} elseif ($this->reporter->db->dbType == 'mssql'){
return "LEFT(".$this->_get_column_select($layout_def).",11) BETWEEN LEFT((DATEADD(dd,-7,GETDATE())),11) AND LEFT((DATEADD(dd,-1,GETDATE())),11)";
}else{
return "LEFT(".$this->_get_column_select($layout_def).",10) BETWEEN LEFT((current_date - interval '7' day),10) AND LEFT(current_date,10)";
}
}

I'm not quite sure what I'm doing wrong with the date functions in there, but if someone could point me in the right direction, I'd appreciate the help!

Thanks -
k