to filer on a date field do the following steps
- make sure the
import datetimeis in the .visidatarc file. - format the date column with
@to let visidata know it is a date column. - be in the column, and do a filter
z| - key in the command
DATE_FIELD_NAME > datetime.date(YYYY,M,D)
INCIDENT_DATE > datetime.date(2016,1,1)
To split a date column into separate year, month, and day columns in VisiData, navigate to the relevant date column and use the split function with a regular expression. For dates formatted as "YYYY-MM-DD", make sure the date column is fomratted as "@".
- Move to the date column you want to split.
- Press
:to open the split regex prompt. - Enter a hyphen character (
-) to split the date at each hyphen (which is between year, month, and day). - Press Enter. The date column will split into a new columns containing the year, month, and day values as a list.
- Enter
(to split the list into three columns. - Enter
^to rename each of the new columns (Year Month Day)