unit Udate;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxCalendar,
cxDBEdit, Vcl.StdCtrls, Vcl.Grids, Vcl.DBGrids, Data.DB, DBAccess, MyAccess,
MemDS;
type
TForm1 = class(TForm)
MyConnection1: TMyConnection;
MyQuery1: TMyQuery;
MyDataSource1: TMyDataSource;
DBGrid1: TDBGrid;
Button1: TButton;
cxDBDateEdit1: TcxDBDateEdit;
cxDBDateEdit2: TcxDBDateEdit;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
MyQuery1.sql.text:=' select vn_stat.vn,vn_stat.hn,vn_stat.pdx,vn_stat.vstdate from vn_stat where vstdate between "'+formatdatetime('yyyy-mm-dd',cxDBDateEdit1.date)+'" and "'+formatdatetime('yyyy-mm-dd',cxDBDateEdit1.date)+'" ';
MyQuery1.open;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.