日期和时间选择并更新到数据库中 [英] DATE and TIME selecting and updating into the database

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

问题描述

iam用c#做一个asp.net应用程序,我需要将所选的日期值插入数据库中,并同时显示在texbox中.而主要的问题是当我单击按钮时,只有日历应该显示,而且我需要在日历中搜索带有月份的日期.帮我解决SQL问题,只告诉我将所选日期和时间插入数据库的查询
.帮助我

iam doing an asp.net application with c# ,i need to insert the selected date value into the database and also display in the texbox. and the main problem is when i click the button then only the calendar should display and also i need to search for the date with the month in the calendar. help me out for SQL just say me the query for inserting the selected date and time into the database
. help me out

推荐答案

SELECT * FROM myTable WHERE DATEPART(month, dateColumn)=DATEPART(month,'2011-04-21')


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

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