选择当前日期

编程入门 行业动态 更新时间:2024-10-25 14:27:15
本文介绍了选择当前日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这一定很简单,我正在尝试使用仅使用今天的日期选择记录的Jet 4.0使用OLEDB 适配器构建一个选择查询。在 访问=日期()工作得很好但当然它在这里不起作用。现在()工作 但是没有选择我认为现在看日期和时间的日期? 我怎样才能看到日期?谢谢

This has to be so simple, I''m trying to build a select query using OLEDB adapter using Jet 4.0 that only selects records with today''s date. In access =Date() works great but of course it doesn''t work here. Now() works but doesn''t select the date I assume cause now looks at the date and time? How can I get this to only look at the date? Thanks

推荐答案

现在()。日期或System.DateTime.Now.Date 那是什么你在找? Imran。 " B-Dog" < BD *** @ hotmail>在消息中写道 news:ew ************** @ tk2msftngp13.phx.gbl ... Now().Date or System.DateTime.Now.Date Is that what you were looking for? Imran. "B-Dog" <bd***@hotmail> wrote in message news:ew**************@tk2msftngp13.phx.gbl... 这必须如此很简单,我正在尝试使用仅使用今天日期选择记录的Jet 4.0使用OLEDB 适配器构建一个选择查询。在 access = Date()效果很好但当然它在这里不起作用。现在()有效,但是没有选择我认为现在看日期和时间的日期吗?我怎样才能看到日期?谢谢 This has to be so simple, I''m trying to build a select query using OLEDB adapter using Jet 4.0 that only selects records with today''s date. In access =Date() works great but of course it doesn''t work here. Now() works but doesn''t select the date I assume cause now looks at the date and time? How can I get this to only look at the date? Thanks

" B-Dog" < BD *** @ hotmail>在留言中写道 news:ew ************** @ tk2msftngp13.phx.gbl ... "B-Dog" <bd***@hotmail> wrote in message news:ew**************@tk2msftngp13.phx.gbl... 这个必须如此简单,我正在尝试使用JetB4使用OLEDB构建一个选择查询,它只选择具有今天日期的记录。在 access = Date()效果很好但当然它在这里不起作用。现在()有效,但是没有选择我认为现在看日期和时间的日期吗?我怎样才能看到日期?谢谢 This has to be so simple, I''m trying to build a select query using OLEDB adapter using Jet 4.0 that only selects records with today''s date. In access =Date() works great but of course it doesn''t work here. Now() works but doesn''t select the date I assume cause now looks at the date and time? How can I get this to only look at the date? Thanks

根据我的Jet SQL 4.0帮助文件,它支持一个名为 CURDATE()的函数。试一试。

According to my Jet SQL 4.0 help file, it supports a function called CURDATE(). Give that a shot.

" Imran Koradia" <无**** @ microsoft>在消息中写道 新闻:%2 *************** @ TK2MSFTNGP12.phx.gbl ... "Imran Koradia" <no****@microsoft> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl... 现在()。日期或System.DateTime.Now.Date 那是你在找什么? Now().Date or System.DateTime.Now.Date Is that what you were looking for?

不,他'希望使用数据库级日期函数。但是,如果 没有其他方法可以动态构建一个SQL字符串,并且 格式化日期

No, he''s looking to use the database-level date functions. However, if there''s no other way around it he could build an SQL string dynamically and format the date into it

更多推荐

选择当前日期

本文发布于:2023-10-31 07:17:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545407.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!