在开始日期和结束日期之间查找日期 [英] Finding date between start date and end date

查看:125
本文介绍了在开始日期和结束日期之间查找日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检查日期是否在开始日期和结束日期之间.

I want to check whether a date is between start date and end date.

我添加了where子句

i have added a where clause

where datepaid between '2010-04-01' AND '2010-04-15'

但问题在于它不包括"2010-04-15".

but the problem is that it excludes '2010-04-15'.

它应该包括结束日期,我该怎么做?

It should include end date also how can i do this?

请帮助我

此致

pankaj

推荐答案

明确指定时间部分:

WHERE datepaid BETWEEN '2010-04-01 00:00:00' AND '2010-04-15 23:59:59'

这篇关于在开始日期和结束日期之间查找日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆