1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
If WmiProperty.name='CreationTime'
then
With WmiDateTime do
begin
CreationTime:=WmiProperty.Get_Value;
UTCSpecified:=True;
Year:=StrToInt(Copy(CreationTime,1,4));
Month:=StrToInt(Copy(CreationTime,5,2));
Day:=StrToInt(Copy(CreationTime,7,2));
Hours:=StrToInt(Copy(CreationTime,9,2));
Minutes:=StrToInt(Copy(CreationTime,11,2));
Seconds:=StrToInt(Copy(CreationTime,13,2));
Microseconds:=StrToInt(Copy(CreationTime,16,6));
Utc:=StrToInt(Copy(CreationTime,22,4));
Write('Date : ',DateTimeToStr(GetVarDate(True)));
end; |
Partager