2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: FDATE, time, current, current time, date, current, current date
10 FDATE --- Get the current time as a string
11 ******************************************
13 .. function:: FDATE(DATE)
15 ``FDATE(DATE)`` returns the current date (using the same format as
16 :ref:`CTIME`) in :samp:`{DATE}`. It is equivalent to ``CALL CTIME(DATE,
20 The type shall be of type ``CHARACTER`` of the
21 default kind. It is an ``INTENT(OUT)`` argument. If the length of
22 this variable is too short for the date and time string to fit
23 completely, it will be blank on procedure return.
26 The current date and time as a string.
35 .. code-block:: fortran
41 .. code-block:: fortran
45 character(len=30) :: date
47 print *, 'Program started on ', date
48 do i = 1, 100000000 ! Just a delay
52 print *, 'Program ended on ', date
53 end program test_fdate