***#1.根据sendTime(string类型)获取近一周/一年内的数据记录):
1.(sendTime转date类型):toDateTime(a.sendtime)
2.1.近一周:where toDateTime(a.sendtime) >= subtractWeeks(now(), 1)
或
2.2.近一周:where toDateTime(a.sendtime)>= (today()-7)
3.近一年:where toDateTime(a.sendtime) >= subtractYears(today(), 1))一年前的今天 **
String sql ="SELECT a.sendtime,a.lai,a.ci from hndx.rzx_long_message a
where toDateTime(a.sendtime) >= subtractWeeks(now(), 1) and
a.caller_number='"+phoneNumber+"' order by a.sendtime desc limit 1";