[UP]


Manual Reference Pages  - now (3)

NAME

now(3f) - [M_time:DATE_PRINTING] return string representing current time given format (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
Example
Author
License

SYNOPSIS

function now(format) RESULT (timestr)

    character(len=*),intent(in)     :: format  ! input format string
    character(len=:),allocatable    :: timestr ! formatted date

DESCRIPTION

The now(3f) function is a call to the fmtdate(3f) function using the current date and time. That is, it is a convenient way to print the current date and time.

OPTIONS

format string describing how to format the current date and time. For a complete description of the formatting macros supported see fmtdate_usage(3f).

RETURNS

timestr
  formatted output string representing date

EXAMPLE

Sample Program:

    program demo_now
    use M_time, only : now
    implicit none
       write(*,*)now("The current date is %w, %l %d, %Y %H:%m:%s %N")
       call showme()
    contains
    subroutine showme() ! see all formatting options
    use M_time, only : fmtdate_usage
       call fmtdate_usage() ! see all formatting options
    end subroutine
    end program demo_now

results:

      The current date is Sun, Jul 17th, 2016 01:21:35 PM
       ::
       :: description of all formatting options will appear here
       ::

AUTHOR

John S. Urban, 2015

LICENSE

Public Domain


now (3) March 11, 2021
Generated by manServer 1.08 from 4f6d5876-655b-436e-ad77-4f5bf1ec84b9 using man macros.