社区
C#
帖子详情
vs2005里怎样取得本月的第一时间?
wuxiangtuan
2007-07-05 02:00:08
DateTime _begin = new DateTime();
_begin = ??????(此处为提问的)
DateTime _end = new DateTime();
_end = DateTime.Now;
因为我在SQL里要用到
between @begin and @end
(例如between '2007-07-01' and '2007-07-5')
这样的语句
所以我要取到本月的一天的,零点零分零秒也能取到最好了.谢谢了
...全文
127
5
打赏
收藏
vs2005里怎样取得本月的第一时间?
DateTime _begin = new DateTime(); _begin = ??????(此处为提问的) DateTime _end = new DateTime(); _end = DateTime.Now; 因为我在SQL里要用到 between @begin and @end (例如between '2007-07-01' and '2007-07-5') 这样的语句 所以我要取到本月的一天的,零点零分零秒也能取到最好了.谢谢了
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
godgreat
2007-07-05
打赏
举报
回复
DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + "1"
wuxiangtuan
2007-07-05
打赏
举报
回复
谢谢楼上提供的答案,非常感谢你
Macosx
2007-07-05
打赏
举报
回复
int year = DateTime.Now.Year;
int month = DateTime.Now.Month;
DateTime dt = new DateTime(year, month, 1);
fw629
2007-07-05
打赏
举报
回复
string MyString = "Jan 1, 2002";
DateTime MyDateTime = DateTime.Parse(MyString);
wuxiangtuan
2007-07-05
打赏
举报
回复
各位高手!!
是不是很忙呢
帮帮小弟吧
AI人工智能毕业设计课题:人脸识别公司签到系统
人脸打卡:通过摄像头打卡,每天只能打卡一次,只计算
第一
次打卡信息 我的打卡记录:显示所有的打卡记录 我的本周打卡统计:员工本周的打卡信息 我的
本月
打卡统计:员工
本月
的打卡信息 我的本年打卡统计:...
oracle取
本月
最后一天是星期几_在oracle
里
,如何
取得
本周、
本月
、本季度、本年度的
第一
天和最后一天的
时间
...
------解决方案----------------------本周select trunc(sysdate,'d')+1 from dual;select trunc(sysdate,'d')...--
本月
select trunc(sysdate,'mm') from dual;select last_day(trunc(sysdate)) from dual;--本季sel...
在oracle
里
,如何
取得
本周、
本月
、本季度、本年度的
第一
天和最后一天的
时间
在oracle
里
,如何
取得
本周、
本月
、本季度、本年度的
第一
天和最后一天的
时间
------解决方案-------------------- SQL code --本周 select trunc(sysdate,'d')+1 from dual; select trunc(sysdate,'d')+7 from ...
在oracle
里
,如何
取得
本周、
本月
、本季度、本年度的
第一
天和最后一天的
时间
...
在oracle
里
,如何
取得
本周、
本月
、本季度、本年度的
第一
天和最后一天的
时间
------解决方案-------------------- --本周 select trunc(sysdate,'d')+1 from dual; select trunc(sysdate,'d')+7 from dual; --...
sql查询当天、本周、
本月
记录
Sql 查询当天、本周、
本月
记录 –查询当天: select * from info where DateDiff(dd,datetime,getdate())=0 –查询24小时内的: select * from info where DateDiff(hh,datetime,getDate())
C#
110,568
社区成员
642,567
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章