B bryanliu Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #1 在select 语句中怎么取datetime中的date. 取2002-9-13 16:08:49后得2002-9-13?
H HunterTeam Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #4 vdate:=strtodate(2002-9-13 16:08:49); vString:=formatdatetime('yyyy-mm-dd',vdate);
S shengs Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #6 select left(fieldname,10) from talbename
B bryanliu Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #7 我是要做时间比较的 比如: select * from tablename where function(日期时间字段)>=2002-9-10
Q QuickSilver Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #8 select * from 表 where field>=#2002-09-10# 或 select * from 表 where year(field)*10000+month(field)*100+day(field)>=20020910
select * from 表 where field>=#2002-09-10# 或 select * from 表 where year(field)*10000+month(field)*100+day(field)>=20020910
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #9 select DateValue(FieldName) form TableName
S svw0506 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #10 用DatePart函数: SELECT DatePart('YYYY',Date1) AS Date1 FROM Table1;
H HunterTeam Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #11 日期字符前后加上#号 select * from tablename where 日期时间字段>=#2002-9-10#
S svw0506 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-13 #12 with Query1 do begin Close; SQL.Text:='SELECT * FROM Table1 where DatePart(''YYYYMMDD'',Date1) >'+QuotedStr('20020910'); Open; end;
with Query1 do begin Close; SQL.Text:='SELECT * FROM Table1 where DatePart(''YYYYMMDD'',Date1) >'+QuotedStr('20020910'); Open; end;