Tabular data handling toolkit  


Manual page for dateconvert(1)(TDH)

dateconvert(1) - convert dates from one notation to another



SYNOPSIS

dateconvert [-c date] [-f field#] oldformat newformat [-u]


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 -f nor -c is specified, then -c is assumed. Available date formats and date notation discussion may be found in dates .


OPTIONS

-c date

Command-line mode. Convert date and write the result to standard output with no trailing newline.

-f n

Filter mode. Read a stream of data records on standard input and convert the dates found in field n. Any values found that are invalid dates will be left alone. The resulting stream of data records is written to standard output.

-u

Convert underscores to spaces in date results that have them, such as when full notation is used.

-w

Warn on invalid dates in filter mode by appending the string :BAD-DATE to the offending field.


EXAMPLES

dateconvert -c 021700 mmddyy full -u

This would convert 021700 to February 17, 2000

cat mydate | dateconvert -f 3 mmddyy ddMMMyyyy

This would convert every date in field 3 of the data stream from mmddyy format to ddMMMyyyy format.


Tabular data handling toolkit 
Copyright Steve Grubb


Markup created by unroff 1.0,    September 19, 2003.