.ig >> TDHkit: dateconvert(1)


Tabular data handling toolkit  


.>> .TH dateconvert(1) TDH "19-SEP-2003 TDH scg@jax.org" .SH NAME dateconvert(1) \- convert dates from one notation to another .ig >>


.>> .SH SYNOPSIS \fCdateconvert [-c \fIdate\fC] [-f \fIfield#\fC] \fIoldformat newformat\fC [-u] .ig >>


.>> .SH DESCRIPTION Can operate either on a single date given on command line (-c) or as a filter on a stream of data (-f), converting dates in one field. If neither \fC-f\fR nor \fC-c\fR is specified, then \fC-c\fR is assumed. Available date formats and date notation discussion may be found in .ig >> .>> \0dates .ig >> .>> \0. .ig >>


.>> .SH OPTIONS .LP \fC-c \fIdate\fR .IP \0 Command-line mode. Convert \fIdate\fR and write the result to standard output with no trailing newline. .ig >>

.>> .LP \fC-f \fIn\fR .IP \0 Filter mode. Read a stream of data records on standard input and convert the dates found in field \fIn\fR. Any values found that are invalid dates will be left alone. The resulting stream of data records is written to standard output. .ig >>

.>> .LP \fC-u\fR .IP \0 Convert underscores to spaces in date results that have them, such as when \fCfull\fR notation is used. .ig >>

.>> .LP \fC-w\fR .IP \0 Warn on invalid dates in filter mode by appending the string \fC:BAD-DATE\fR to the offending field. .ig >>


.>> .SH EXAMPLES .LP \fCdateconvert -c 021700 mmddyy full -u\fR .IP This would convert \fC021700\fR to \fCFebruary 17, 2000\fR .LP \fCcat mydate | dateconvert -f 3 mmddyy ddMMMyyyy\fR .IP This would convert every date in field 3 of the data stream from mmddyy format to ddMMMyyyy format. .ig >>


Tabular data handling toolkit 
Copyright Steve Grubb
.>>