Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-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
Aug 20, 2003
27
0
0
US
Is there a function in Fortran77 to get the date and time?

Thanks in advance for your help.

mjs84
 
Replies continue below

Recommended for you

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.
Back
Top