1、 取得时间函数,只需要小时和分,插入数据库
2、 两个时间段查询,对查询结果进行打印阅览。

解决方案 »

  1.   

    1.
    procedure TForm1.Button1Click(Sender: TObject);var
      Present: TDateTime;
      Year, Month, Day, Hour, Min, Sec, MSec: Word;
     begin
      Present:= Now;
      DecodeDate(Present, Year, Month, Day);
      Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '
        + IntToStr(Month) + ' of Year ' + IntToStr(Year);
      DecodeTime(Present, Hour, Min, Sec, MSec);
      Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '
        + IntToStr(Hour);
    end;
    2.C:\Program Files\Borland\Delphi5\Demos\Quickrpt
      

  2.   

    显示日期要Format:='yyyy-MM',默认日期不要用系统的1899-12-30。
      

  3.   

    1、vstr := formatdatetime('HH:MM',now) 小时、分2、select * from tablename where datefield between datestart and dateend
      datestart,dateend为日期值
    打印报表建议使用fastReport
      

  4.   

    Minuteof 取得分
    HourOf  取得小时
    //uses DateUtils用Qrreport做就好了
      

  5.   

    都所完了,也分我点分把。。推荐decodetime();第二个问题,时间段的问题就  select * from table_name where date between :#start and :#end;
      

  6.   

    在大型数据库里不能只插入时间, 在设置DateTime字段时,必须插入日期,你不如就直接用1900-1-1 做为日期,然后再插入时间吧
    第二点,就是把日期加上去再进行查询了