X
xmzhao
Unregistered / Unconfirmed
GUEST, unregistred user!
用SQL查询工龄,是用出生时间到现在时间查的,但50年之前的查不到,不知道是为什么?
if DateTimePicker1.Date<=DateTimePicker2.Date then
with DataModule3.Query1 do
begin
SQLADD();
SQL.Add('where Source1.BD BETWEEN _DATE1 AND _DATE2');
SQL.Add('ORDER BY Source1.UA');
ParamByName('P_Date1').AsDate:=DateTimePicker1.Date;
ParamByName('P_Date2').AsDate:=DateTimePicker2.Date;
try
Prepare;
open;
if DateTimePicker1.Date<=DateTimePicker2.Date then
with DataModule3.Query1 do
begin
SQLADD();
SQL.Add('where Source1.BD BETWEEN _DATE1 AND _DATE2');
SQL.Add('ORDER BY Source1.UA');
ParamByName('P_Date1').AsDate:=DateTimePicker1.Date;
ParamByName('P_Date2').AsDate:=DateTimePicker2.Date;
try
Prepare;
open;