CHARACTER*24 DT2STR( JDATE, JTIME ) INTEGER, INTENT(IN ) :: JDATE ! date, YYYDDD = 1000*year + day(1...365,6) INTEGER, INTENT(IN ) :: JTIME ! time, HHMMSS = 10000*hour + 100*min + sec
void dt2strc( int jdate , int jtime , char buffer[ 25 ] )
See also subroutines ISDSTIME(), JULIAN() , DAYMON() , WKDAY() , HHMMSS() , and MMDDYY() as well as EDSS/ Models-3 date-time manipulation programs gregdate and juldate.
#include "iodecl3.h"
if called from C.
JDATE:JTIME represents a date and time according to Models-3 conventions.
DATEs are YYYYDDD = YEAR*1000 + DAY TIMEs are HHMMSS = HOUR*10000 + MINS*100 + SECS
USE M3UTILIO
... CHARACTER*24 DT2STR ... CHARACTER*24 BUFFER ... BUFFER = DT2STR( 1988060, 123456 ) C ==> BUFFER now holds "12:34:45 March 1, 1988" ... WRITE( *,* ) 'Date and time ', DT2STR( 1995001, 0 ) C ==> writes "Date and time 00:00:00 Jan. 1, 1995" ...
... #include "iodecl3.h" ... char buffer[ 25 ] ; ... dt2strc( 1995001, 10000, buffer ) ; /* buffer now holds "1:00:00 Jan. 1, 1995" ...
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages