-- $Source: /commtar/monoBANK/CICS_INTF/datim.ada,v $ -- $Revision: 1.7 $ $Date: 88/03/29 21:22:11 $ $Author: rac $ procedure Datim; with Calendar; use Calendar; with Unchecked_Conversion; with Temp_IO; use Temp_IO; procedure Datim is Date : Time; Year : Year_Number; Month : Month_Number; Day : Day_Number; Seconds : Day_Duration; Tot_Seconds : Integer; Int_Seconds : Integer; Hours : Integer; Minutes : Integer; function Dur_To_Int is new Unchecked_Conversion(Duration, Integer); begin Date := Clock; Put_Line("Start breaking up date"); Split(Date, Year, Month, Day, Seconds); Tot_Seconds := Dur_To_Int(Seconds)/(2**14); Minutes := Tot_Seconds/60; Int_Seconds := Tot_Seconds rem 60; Hours := Minutes/60; Minutes := Minutes rem 60; Put_Line("Date is " & Integer'Image(Year) & "/" & Integer'Image(Month) & "/" & Integer'Image(Day)); Put_Line("Seconds are " & Integer'Image(Int_Seconds)); Put_Line("Time is " & Integer'Image(Hours) & ":" & Integer'Image(Minutes) & ":" & Integer'Image(Int_Seconds)); end;