sql server中的日期时间选择。 [英] Date Time selection in sql server.

查看:150
本文介绍了sql server中的日期时间选择。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个表中有两列DATE,TIME。我想在10/10/2013 10:10 - 10/12/2013 12:00之间获取记录。告诉我如何获取。

I have two column DATE,TIME in one table. I want to fetch record between 10/10/2013 10:10 - 10/12/2013 12:00. Tell me how to fetch.

推荐答案

看看这个:



在sql server中选择日期时间。 [ ^ ]



希望有帮助:)
Check this out:

Date Time selection in sql server.[^]

hope it helps :)






请参阅以下链接。它可能对你有帮助。



http://stackoverflow.com/questions/7079543/how-can-i-find-the-data-between-two-specific-times-in-sql [ ^ ]


你可以添加它们。



select * from mytable where date + time> = '10 / 10/2013 10:10:00'和date + time< = '10 / 12/2013 12:00:00'
You can just add them.

select * from mytable where date + time >= '10/10/2013 10:10:00' and date + time <= '10/12/2013 12:00:00'


这篇关于sql server中的日期时间选择。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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