Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/time/

time_string.pro


Routines

Routines from time_string.pro

time_substitute, destination, source, pos, next_position=next_position
result = time_string(time0, format=format, precision=precision, epoch=epoch, date_only=date_only, tformat=tformat, local_time=local_time, is_local_time=is_local_time, msec=msec, sql=sql, autoprec=autoprec, deltat=deltat, timezone=timezone, badstring=badstring)

FUNCTION: time_string(TIME)NAME: time_stringPURPOSE: Converts time to a date string.

Routine details

top source time_substitute

time_substitute, destination, source, pos, next_position=next_position

Parameters

destination
source
pos

Keywords

next_position

top source time_string

result = time_string(time0, format=format, precision=precision, epoch=epoch, date_only=date_only, tformat=tformat, local_time=local_time, is_local_time=is_local_time, msec=msec, sql=sql, autoprec=autoprec, deltat=deltat, timezone=timezone, badstring=badstring)

FUNCTION: time_string(TIME) NAME: time_string PURPOSE: Converts time to a date string. INPUTs: TIME input can be a scalar or array of any dimension of type: double(s) seconds since 1970 string(s) format: YYYY-MM-DD/hh:mm:ss structure(s) format: given in "time_struct" float(s) longs(s) values outside normal range will be corrected. KEYWORDS: LOCAL_TIME ; if set then local time is displayed. TFORMAT: a format string such as: "YYYY-MM-DD/hh:mm:ss.ff DOW TDIFF" the following tokens are recognized: YYYY - 4 digit year yy - 2 digit year MM - 2 digit month DD - 2 digit date hh - 2 digit hour mm - 2 digit minute ss - 2 digit seconds .fff - fractional seconds MTH - 3 character month DOW - 3 character Day of week DOY - 3 character Day of Year TDIFF - 5 character, hours different from UTC (useful with LOCAL keyword) if TFORMAT is defined then the following keywords are ignored. FORMAT: specifies output format. FORMAT=0: YYYY-MM-DD/hh:mm:ss FORMAT=1: YYYY Mon dd hhmm:ss FORMAT=2: YYYYMMDD_hhmmss FORMAT=3: YYYY MM dd hhmm:ss FORMAT=4: YYYY-MM-DD/hh:mm:ss FORMAT=5: YYYY/MM/DD hh:mm:ss FORMAT=6: YYYYMMDDhhmmss SQL: produces output format: "YYYY-MM-DD hh:mm:ss.sss" (quotes included) which convenient for building SQL queries. PRECISION: specifies precision -5: Year only -4: Year, month -3: Year, month, date -2: Year, month, date, hour -1: Year, month, date, hour, minute 0: Year, month, date, hour, minute, sec >0: fractional seconds AUTOPREC If set PREC will automatically be set based on the array of times DELTAT: (float) PREC set based on this precision. DATE_ONLY: Same as PREC = -3 MSEC: Same as PREC = 3 OUTPUT: string with the following format: YYYY-MM-DD/hh:mm:ss (Unless modified by keywords.) See Also: "time_double" , "time_struct" or "time_ticks" NOTE: This routine works on vectors and is designed to be fast. Output will have the same dimensions as the input. CREATED BY: Davin Larson Oct 1996 $LastChangedBy: pcruce $ $LastChangedDate: 2014-02-07 17:21:01 -0800 (Fri, 07 Feb 2014) $ $LastChangedRevision: 14206 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/time/time_string.pro $

Parameters

time0

Keywords

format
precision
epoch
date_only
tformat
local_time
is_local_time
msec
sql
autoprec
deltat
timezone
badstring

File attributes

Modification date: Thu Feb 13 16:43:41 2014
Lines: 119