How to filter ELB logs by today's date?
Either request_timestamp needs to be converted from the ISO 8601 formatted string into a timestamp with time zone, or current_timestamp needs to be converted into the string.

One method is to convert request_timestamp into a string in format %Y-%m-%d, e.g.


split_part(request_timestamp, 'T', 1)
substr(request_timestamp, 1, 10)


then compare it with current_timestamp which can be converted to the ISO 8601 formatted string.

Here is the final query:

SELECT *
FROM elb_logs
WHERE split_part(request_timestamp, 'T', 1) = split_part(to_iso8601(current_timestamp), 'T', 1)
LIMIT 10