SqlServer语句获取整点数据
if (this.cbxSql.Checked)
{
SqlSelect = "SELECT Area_Date as Area_Date,PLE as PLE FROM " + TableName + " Where PLE>=0 and (Area_Date>='" + Local_richushijian_Quxian + "' and Area_Date <='" + Local_riluoshijian_Quxian + "') and RIGHT(CONVERT(varchar(19),Area_date,120),5)='00:00' and area_code=0";
dt = Local_mysql.Select(SqlSelect);
}
else
{
SqlSelect = "SELECT Area_Date as Area_Date,PLE as PLE FROM " + TableName + " Where PLE>=0 and (Area_Date>='" + Local_richushijian_Quxian + "' and Area_Date <='" + Local_riluoshijian_Quxian + "') and substr(area_date,15,18)='00:00' and area_code=0";
dt = SQLiteHelper.ExecuteDataSet("Data Source=" + SqlLiteDBName, SqlSelect, CommandType.Text).Tables[0];
}
mysql
RIGHT(Area_date,5)='00:00'