使用DECODEDATE、DECODETIME函数就可以实现你的要求。
procedure decodedate(date : Tdatetime;var year,month,day :word);
procedure decodetime(date : Tdatetime;var hour,min,sec,msec :word);
procedure decodedate(date : Tdatetime;var year,month,day :word);
procedure decodetime(date : Tdatetime;var hour,min,sec,msec :word);
Minuteof
secondsof
使用TRemotableXS类,可帮助程序员串行化自定义数据类型为Soap支持的
数据封装格式。
TRemotableXS提供两个虚方法
NativeToXS和XSToNative
对于TXSCustomDateTime,可以调用这两个方法。
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 := IntToStr(sec)+'The time is Minute ' + IntToStr(Min) + ' of Hour '
+ IntToStr(Hour);
end;
……………………………………………………………………………………
.--, .--,
( ( \.---./ ) )
'.__/o o\__.'
{= ^ =}
> - <
/ \
// \\
//| . |\\
"'\ /'"_.-~^`'-.
\ _ /--' `
___)( )(___
(((__) (__)))
……………………………………………………………………………………
procedure decodetime(date : Tdatetime;var hour,min,sec,msec :word);