兔 兔爷 Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #1 如何只取时间的时和分不取秒??如16:30:02 我如何只取16和30???有没有现成的涵数,我不想用截取字符串的方法太麻烦。
O o*o Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #2 FormatDateTime('hh:mm',Time);
O o*o Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #3 Label1.Caption:=FormatDateTime('hh:mm',Time);
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #4 DecodeTime(Time: TDateTime; var Hour, Min, Sec, MSec: Word);<br>只用Hour,Min<br>
S sherman Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #5 应该是formatdatetime("hh",date);<br>formatdatetime("mm",date);
S sunzj Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-12 #7 procedure DateTimeToString(var NewString: string; const Format: string; DateTime: TDateTime);
T Tintin Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-18 #9 差不多使这个意思吧:<br><br>function GetHourTime(const ATime : TDateTime ) : TDateTime;<br>var<br> Hour, Min, Sec, MSec: Word;<br>begin<br> DecodeTime(ATime, Hour, Min, Sec, MSec);<br> Result := Hour+Min;<br>end;
差不多使这个意思吧:<br><br>function GetHourTime(const ATime : TDateTime ) : TDateTime;<br>var<br> Hour, Min, Sec, MSec: Word;<br>begin<br> DecodeTime(ATime, Hour, Min, Sec, MSec);<br> Result := Hour+Min;<br>end;
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-19 #11 其实截取字符串有什么麻烦的,挺好用的嘛.<br>BTW,问题可以结束了.