ex4.pp 583 B

1234567891011121314151617181920212223242526272829303132
  1. Program Example4;
  2. uses Dos;
  3. { Program to demonstrate the PackTime and UnPackTime functions. }
  4. var
  5. DT : DateTime;
  6. Time : longint;
  7. begin
  8. with DT do
  9. begin
  10. Year:=1998;
  11. Month:=11;
  12. Day:=11;
  13. Hour:=11;
  14. Min:=11;
  15. Sec:=11;
  16. end;
  17. PackTime(DT,Time);
  18. WriteLn('Packed Time : ',Time);
  19. UnPackTime(Time,DT);
  20. WriteLn('Unpacked Again:');
  21. with DT do
  22. begin
  23. WriteLn('Year ',Year);
  24. WriteLn('Month ',Month);
  25. WriteLn('Day ',Day);
  26. WriteLn('Hour ',Hour);
  27. WriteLn('Min ',Min);
  28. WriteLn('Sec ',Sec);
  29. end;
  30. end.