如何匹配列时间和系统时间以仅显示SQL Server 2012中的及时数据 [英] How can I match column time and system time to show only the timely data in SQL server 2012

查看:83
本文介绍了如何匹配列时间和系统时间以仅显示SQL Server 2012中的及时数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的查询,我试过这个。

从TrainMaster中选择*,其中ScheduleDeparture =转换(varchar(50),Getdate(),108)



我尝试了什么:



我已经尝试了上述查询,但它没有得到时间

this is my query and i have tried this.
Select * from TrainMaster where ScheduleDeparture = Convert(varchar(50), Getdate(),108)

What I have tried:

I have tried the above query but it is not getting the time

推荐答案

我在该表中有一个名为TrainMaster的表我有1列是计划出发。

在计划出发时用户插入时间和显示在网格视图上的数据。

但我需要的是scheduledeparture列时间和系统时间应匹配,特定时间数据应显示在gridview上,当时间结束时,应显示下一个数据。 PLZ帮助我
I have a table called TrainMaster in that table i have 1 column is Schedule departure.
In schedule departure user inserting time and show on the data on grid view.
But i need that is scheduledeparture column time and system time should be matched and that particular time data should be displayed on gridview and when the time is over the next data should be displayed. plz help me for this


这篇关于如何匹配列时间和系统时间以仅显示SQL Server 2012中的及时数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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