关于grd视图选择与日期字段的日期字段 [英] about grd view selection with date field from date todate

查看:82
本文介绍了关于grd视图选择与日期字段的日期字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友



i拿一个数据网格,我用数据库绑定数据。在db我创建4个字段。输入数据后,它将显示在网格,在那个db我给出了datetime字段。



如果我选择从日期到todate数据必须在网格中显示。

how选择数据形式todates。如何在该网格中显示



是否有任何日期事件可以做如此。你给我任何建议

如果您对该邮件有任何疑问,请发送该照片。

hi friends

i take one data grid in that i bind data with database.in that db i created 4 fields.after entering the data it will displaying in the grid,in that db i given datetime field.

if i select fromdate to todate the data has to display in the grid.
how to select data form todates .how to display in that grid

is there any date events to do like that.can u give me any suggestions
if u have any doubts in that mail me pbkc92@gmail.com i will send that picture .

推荐答案

使用DateTimePicker获取日期。

写一个这样的查询

SELECT somecolumns FROM table WHERE somecolumn> ='2013-12-01'AND

somecolumn< ='2013-12- 06'。

日期由你的日期和日期替换。

执行并在网格中显示结果。
Use DateTimePicker to get dates.
Write a query like this
SELECT somecolumns FROM table WHERE somecolumn >= '2013-12-01' AND
somecolumn <= '2013-12-06'.
Dates are replaced by your fromdate and todate.
execute and display result in grid.


这篇关于关于grd视图选择与日期字段的日期字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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