我在运行程序时出现以下提示错误:
" project **.exe raised exception class Econverterror with message ' ":28:2" is not valid date and time ' process stoped.
大家帮忙看看啊,谢谢!
" project **.exe raised exception class Econverterror with message ' ":28:2" is not valid date and time ' process stoped.
大家帮忙看看啊,谢谢!
解决方案 »
- 如何制作一个简易的画板,谁有代码的?
- 如何识别不同类别中的相同定义
- 如何在delphi中通过串口实现IC卡与计算机通信 急!!!
- 送分:请问如何添加资源文件?
- 請高手指点:有没有关于用DELPHI来开发opengl的例子的书籍,请给小弟指点一下
- 请问大家做项目是先从具体的来还是先从抽象的来
- 关于tolecontainer 的问题,请各位来拿分
- 一个关于不同的数据类型符值的问题!!!
- 关于《delphi5开发人员指南》的问题,急救!!!!!!!help!!!
- 如何在QickReport報表中制做網格線???
- 请问PDF417二维码的具体算法是什么? 用程序怎样实现它? 急!
- 菜鸟问题,如何阻止form1运行?请大人来看看!!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, DB, ADODB, ExtCtrls, StdCtrls, ComCtrls;type
TshowRishouRumingxi_w = class(TForm)
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
GroupBox2: TGroupBox;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
Button1: TButton;
RadioButton1: TRadioButton;
GroupBox1: TGroupBox;
DBGrid1: TDBGrid;
Label1: TLabel;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
showRishouRumingxi_w: TshowRishouRumingxi_w;implementationuses login, dateattribute, share;{$R *.dfm}procedure TshowRishouRumingxi_w.FormShow(Sender: TObject);
var
qs,zz:string;
begin
qs:=copy(datetimetostr(dateattribute_w.DateTimePicker2.Date),1,10);
zz:=copy(datetimetostr(dateattribute_w.DateTimePicker3.Date),1,10);Adoquery1.Close;
Adoquery1.SQL.clear;
Adoquery1.sql.Add('select bianhao as 档案编号,zibianhao as 自编号,xingming as 姓名,yingshou as 收入,shoufeidate as 收费日期 from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+''' order by shoufeidate');
Adoquery1.Open;
Dbgrid1.Columns[0].Width:=54;
Dbgrid1.Columns[1].Width:=40;
Dbgrid1.Columns[2].Width:=52;
Dbgrid1.Columns[3].Width:=57;
Dbgrid1.Columns[4].Width:=64;
if not Adoquery1.Eof then
begin
share_w.sql('select sum(yingshou) from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
label1.Caption :='记录:'+inttostr(Adoquery1.Recordcount)+' 合计:'+inttostr(share_w.Adoquery1.fields[0].value);
end else
label1.Caption :='记录:0 合计:0';end;procedure TshowRishouRumingxi_w.Button1Click(Sender: TObject);
var
qs,zz:string;
begin
qs:=copy(datetimetostr(dateattribute_w.DateTimePicker2.Date),1,10);
zz:=copy(datetimetostr(dateattribute_w.DateTimePicker3.Date),1,10);
share_w.SQL('delete binzangshourumingxibiao');
share_w.SQL('insert into binzangshourumingxibiao select * from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
share_w.SQL('insert into binzangshourumingxibiao(xingming,shoufeidate,jicun,yinshou) select xingming,shoufeidate,jine,jine from guhuijfjlku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
{yewushoufeibiao1_w.Adoquery1.Close;
yewushoufeibiao1_w.Adoquery1.SQL.clear;
yewushoufeibiao1_w.Adoquery1.SQL.Add('select * from binzangshourumingxibiao order by zibianhao');
yewushoufeibiao1_w.Adoquery1.Open;
yewushoufeibiao1_w.QuickRep1.Preview; }
end;end.
这么多单元的引用,你还是自己设置断点问题出在哪吧,把关键代码贴出来就好了
zz:=copy(datetimetostr(dateattribute_w.DateTimePicker3.Date),1,10);
有没有错误啊?
function FormatDateTime(const Format: string; DateTime: TDateTime): string; overload;
function FormatDateTime(const Format: string; DateTime: TDateTime; const FormatSettings: TFormatSettings): string; overload;st:=FormatDateTime('yyyy-mm-dd',now);