SQL.Add('select orderno,saledate from 'sales' where saledate<DateValue('+#39+EditDate1.Text+#39+')');

解决方案 »

  1.   

    日期类型用这样的格式看看:
    yyyy-mm-dd
      

  2.   

    Paradox只支持美国格式的日期'mm/dd/yyyy'

    Sql_String:='select orderno,saledate from sales where saledate<'+''''+'08/22/2001'+'''';
    Query1.Close
    Query1.SQL.Clear;
    Query1.SQL.Add(Sql_String);
    Query1.Open;
      

  3.   

    多谢。但我没试成功。
    tikkypeng的语句可能是在别的数据库下能正常运行。在PARADOX下报了一个兼容性错误。
    谁能帮我?(最好有这方面的经历)
      

  4.   

    sql.add('select orderno,saledate from "sales" where saledate<cast("2/21/1989" as date)');
      

  5.   

    多谢newyj(方恨少),你说的成功了!!!
    可惜分数只能给这么多,不然一定会好好感谢你。
    能给个email 吗?
    我的email:[email protected]
    还有问题想问你。
      

  6.   

    分应该给 turbozzh(涡轮超人)  的