如题.

解决方案 »

  1.   

    showmessage(Timetostr(datetimePicker1.time))
      

  2.   

    formatdatetime('hh:mm',datetimePicker1.time)
      

  3.   

    function GetHour(Time: TTime): Integer;
    var
      h, m, s, ms: WORD;
    begin
      DecodeTime(Time, h, m, s, ms);
      Result := h;
    end;function GetMinute(Time: TTime): Integer;
    var
      h, m, s, ms: WORD;
    begin
      DecodeTime(Time, h, m, s, ms);
      Result := m;
    end;
      

  4.   

    uses DateUtils;function HourOfTheDay(const AValue: TDateTime): Word;     {取小时数}
    function MinuteOfTheHour(const AValue: TDateTime): Word;  {取分钟数}
      

  5.   

    FormatDateTime('yyyy-mm-dd',SFindDateTime.Date);  //取日期
    formatdatetime('hh:mm',SFindDateTime.time);//取时间
      

  6.   

    请问一下如何从Tdatetime中得到分钟数和小时数?? 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
    showmessage(formatdatetime('hh:nn',now));