oracle:

SQL时间段

CREATEDATE between to_date('" + startDate + " 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('" + endDate + " 23:59:59','yyyy-mm-dd hh24:mi:ss') - 一天或多天零点到零点

换个写法

if (!string.IsNullOrEmpty(dtStart))
{
queryStatement += " and CREATEDATE >= to_date('" + dtStart + " 00:00:00' ,'yyyy-mm-dd hh24:mi:ss')";
}
if (!string.IsNullOrEmpty(dtEnd))
{
queryStatement += " and CREATEDATE <= to_date('" + dtEnd + " 23:59:59' ,'yyyy-mm-dd hh24:mi:ss')";
}

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-10-12
猜你喜欢
  • 2021-12-03
  • 2021-05-16
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案