这一定很简单,我正在尝试使用仅使用今天的日期选择记录的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
更多推荐
选择当前日期
发布评论