next up previous contents index
Next: DATETIME /TO Up: DATETIME Previous: DATETIME   Contents   Index


DATETIME /FROM

        [SIC\]DATETIME /FROM NOW
        [SIC\]DATETIME /FROM Val1 Form1 ... ValN FormN

    The option /FROM is used to define a single and non-ambiguous date-time.
    The date-time is fully specified as the combination of  a  year,  month,
    day, hour, minute, and seconds. They can be described with the following
    pairs:
      Iye YEAR (integer, default 1970)
      Imo MONTH (integer, default 1)
      Ida DAY (integer, default 1)
      Iho HOUR (integer, default 0)
      Imi MINUTE (integer, default 0)
      Nse SECONDS (real, default 0.0)

    The pairs can be combined in any order, but each field must  be  defined
    once  at  most.  If a field is not specified, its default value is used.
    The day, hour, minute, and seconds fields  can  go  beyond  their  usual
    ranges: the resulting date-time is shifted accordingly. For example:
      DATETIME /FROM 2015 YEAR                 ! 2015-01-01 00:00:00.000
      DATETIME /FROM 2015 YEAR 11 MONTH 16 DAY ! 2015-11-16 00:00:00.000
      DATETIME /FROM 2015 YEAR 100 DAY         ! 100-th day of year 2015


    The  keyword NOW can be used alone to specify the current UTC date-time.
    The values PREVIOUS or NEXT can also be used for each  field:  they  re-
    solve  as  the previous or next quantity with respect to the current UTC
    date-time. These syntaxes define all the fields at once, i.e.  they  can
    not be combined with other pairs of values. For example:
      DATETIME /FROM NOW           ! Now (UTC)
      DATETIME /FROM PREVIOUS DAY  ! Yesterday, same time
      DATETIME /FROM NEXT HOUR     ! Today or tomorrow, in 1 hour from now


    The option /FROM also recognizes specific date and/or time formats:
      JULIAN       Julian date with fractional day (e.g. 2457343.227256944)
      MJD          Modified Julian Date (e.g. 57342.72725694445)
      ISO          ISO date (e.g. 2015-11-16T17:27:15.000)
      GAG_DATE     GAG date integer format (e.g. -3207)
      YYYYMMDD     date with all numbers (e.g. 20151116)
      DD-MMM-YYYY  date where MMM is the month in letters (e.g. 16-NOV-2015)
      RADIAN       time of day in radians, usually betwen 0 and 2*pi
      SEXAGESIMAL  time of day using sexagesimal notation (e.g. 17:27:15.000)

    JULIAN,  MJD  and ISO define the 6 date and time fields: they can not be
    combined with anything else. GAG_DATE, YYYYMMDD, and DD-MMM-YYYY  define
    the  date:  they can be combined with a time specifier. RADIAN and SEXA-
    GESIMAL define the time: they can be combined with a date specifier. For
    example:
      DATETIME /FROM 2015-11-16T17:27:15.000 ISO
      DATETIME /FROM 57342.72725694445 MJD
      DATETIME /FROM -3207 GAG_DATE 4.569490147 RADIAN

    The  inputs  can  be either explicit scalar values, scalar variables, or
    array variables. They can be mixed as long as arrays  have  equal  size.
    For example
      DATETIME /FROM "16-NOV-2015" DD-MMM-YYYY ArrayVar RADIAN
    results  in an array specification, where all the specified values share
    the same date but each time is taken in ArrayVar.


Gildas manager 2024-04-19