如图 三个时间段在表格内显示(和系统时间在相同页面) 将时间段和系统时间作比较 以当前图片内时间段来说 系统时间在时间段一共有两个 即输出2 求解
sql:
正常情况:select count(*) from table where dateTime between 'xxxxxxx' and 'xxxxxxx'
你的需求则是:select count(*) from table where dateTime1 < 'xxxxxxx' and dateTime2>='xxxxxxx'
页面比较:
可以将时间字符串先转化成long类型的时间戳,然后就可以进行比较。
怎么转时间戳,百度下就知道了