DT2STR() and dt2strc()

Fortran version:

    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

C version:

    void dt2strc( int  jdate , 
                  int  jtime ,
                  char buffer[ 25 ] )

Summary:

Format and return the date and time JDATE:JTIME as a character string "HH:MM:SS Month DD, YYYY"

See also subroutines ISDSTIME(), JULIAN() , DAYMON() , WKDAY() , HHMMSS() , and MMDDYY() as well as EDSS/ Models-3 date-time manipulation programs gregdate and juldate.

Preconditions:

#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

Fortran Usage:

For Fortran-90 declarations and interface checking:
    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"
    ...

C Usage:

    ...
    #include "iodecl3.h"
    ...
    char  buffer[ 25 ] ;
    ...
    dt2strc( 1995001, 10000, buffer ) ;
    /*  buffer now holds "1:00:00 Jan. 1, 1995"
    ...


Previous: DAYMON

Next: GETDATE

Up: Date-Time Manipulation Routines

To: Models-3/EDSS I/O API: The Help Pages