Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date and Time in Fortran77??

Status
Not open for further replies.

mjs84

Aerospace
Joined
Aug 20, 2003
Messages
27
Location
US
Is there a function in Fortran77 to get the date and time?

Thanks in advance for your help.

mjs84
 
On PC you can use the Interrupt 0x21 DOS function. You may have to write a short assy subroutine. I don't know about WINDOWS


<nbucska@pcperipherals.com>
 
I don't think the Fortran standard had a function for date and time until Fortran90 (DATE_AND_TIME intrinsic). Some suppliers of Fortran77 had extensions for the date and time but you'll need to find it in your compiler documentation.
 
Microsoft/Digital/Compaq/HP Fortran has two built-in subroutines to return the time and date. Check the &quot;help&quot; on &quot;GETDAT&quot; and &quot;GETTIM&quot;. You typically call these as follows:

C
CALL GETDAT( IYR, IMON, IDAY )
CALL GETTIM( IHR, IMIN, ISEC, IHUND )
C

Where all arguments are INT*2 variables.

Richard Ay
COADE, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top