|
发表于 15-7-2005 06:47 PM
|
显示全部楼层
我会用microsoft SQL SERVER 2000,你可以试一下
如果是从microsoft SQL SERVER 2000 从retrieve result,那应该是这样
select submit_date from 'write your table name' where DATEPART(YEAR,submit_date)='2005'and DATEPART(MONTH,submit_date)='07' and DATEPART(DAY,submit_date)='15'
如果你要从program retrieve data,like use VB.NET to retrieve database data,then it should be like that
VB.NET code
"select submit_date from 'write your table name' where DATEPART(YEAR,submit_date)='" & system.datetime.now.year & "' & "and DATEPART(MONTH,submit_date)='" & system.datetime.now.month & "' & "and DATEPART(DAY,submit_date)='" & system.datetime.now.day & "'" |
|