Check out and contribute to CodePedia, the wiki for developers.

View \TIMEDAT4.PAS

This is the second disk of the PASCAL TUTOR system. It has the

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


program Get_Time_And_Date;           (* For TURBO Pascal 4.0 only *)

uses Dos;

var Year,Month,Day,Weekday        : word;
    Hour,Minute,Second,Hundredths : word;

begin
   GetTime(Hour, Minute, Second, Hundredths);
   GetDate(Year, Month, Day, Weekday);
   Writeln('The date is ',Month:2,'/',Day:2,'/',Year);
   Writeln('The time is ',Hour:2,':',Minute:2,':',Second:2);
end.

corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.