Skip to main content

## timestamp

The timestamp command adds a timestamp field in YYYY-MM-DD HH:MM:SS format to the CSV input.

See also: date_format, date_iso

Flag | Req'd? | Description
-d | No | Output only the date portion of the timestamp
-t | No | Output only the time portion of the timestamp
-n | No | Output the timestamp as a numeric value, with no date/time field separators.
-rt | No | Update the stamp as new rows are read from input. By default, the same stamp is used for all rows input.

The following adds a timestamp to the names.csv data:

csvfix.exe timestamp data/names.csv

producing:

"2012-08-05 10:06:30","Charles","Dickens","M"

"2012-08-05 10:06:30","Jane","Austen","F"

"2012-08-05 10:06:30","Herman","Melville","M"

"2012-08-05 10:06:30","Flann","O'Brien","M"

"2012-08-05 10:06:30","George","Elliot","F"

"2012-08-05 10:06:30","Virginia","Woolf","F"

"2012-08-05 10:06:30","Oscar","Wilde","M"

Created with the Personal Edition of HelpNDoc: Benefits of a Help Authoring Tool

####