>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  DT_TM_BRK
Libraries

DT_TM_BRK

DT_TM_BRK

Name


      DT_TM_BRK

Purpose


      Break a date and time string into separate date and time.

Category


Calling Sequence


      dt_tm_brk, txt, date, time

Inputs


      txt = Input date and time string. in
        May be an array.

Keyword Parameters


Keywords


        FORMAT=fmt Specify format of input.
          Use the letters y,n,d to in the same positions as year,
          month, and day in the input string, and the letters h, m,
          and s for hour, minute, second. Any other characters may
          be used as place holders. Case is ignored. For example:
          for txt='gs_06oct09_0208_multi.png' use
          fmt='xx_yynndd_hhmm_xxxxx.xxx'
          If s and/or m are not used they default to 0.
          Trailing placeholders are not really needed.
          All input strings must have the same format to use this.
        DATE_FORMAT=d Returned date format. This will be a
          structure with {yymmmdd:k,ddmmmyy:1-k} where k is 1 for
          /YYMMMDD date format. Intended for use with date2ymd:
          date2ymd,date,y,m,d,yymmmdd=d.yymmmdd, ddmmmyy=d.ddmmmyy

Outputs


      date = returned date string, null if no date. out
      time = returned time string, null if no time. out

Common Blocks


Notes


      Note: works for systime: dt_tm_brk, systime(), dt, tm
        The word NOW (case insensitive) is replaced
        by the current sysem time.

Modification History


      R. Sterner. 21 Nov, 1988.
      RES 18 Sep, 1989 --- converted to SUN.
      R. Sterner, 26 Feb, 1991 --- renamed from brk_date_time.pro
      R. Sterner, 26 Feb, 1991 --- renamed from brk_dt_tm.pro
      R. Sterner, 1994 Mar 29 --- Allowed arrays.
      R. Sterner, 2006 Nov 09 --- Added FORMAT=fmt, DATE_FORMAT=dfmt.
      R. Sterner, 2007 Jan 04 --- Made for loop index long.
      R. Sterner, 2007 Jul 17 --- Now works if format has no time (hh:mm:ss).
      R. Sterner, 2010 Apr 29 --- Converted arrays from () to [].
      R. Sterner, 2010 Jun 17 --- Added format character # for day of year.
  Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us