Respuesta :

Luckily your file uses YYYY-MM-SS HH:MM:SS timestamps, which sort alphabetically. Those can be compared with < > <= etc without worrying about any date math. MIN="..." and MAX="..." are where those values are input into awk.