elasticsearch/docs/reference/query-languages/esql/_snippets/functions/examples/now.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
402 B
Markdown
Raw Normal View History

% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
**Examples**
```esql
ROW current_date = NOW()
```
| y:keyword |
| --- |
| 20 |
To retrieve logs from the last hour:
```esql
FROM sample_data
| WHERE @timestamp > NOW() - 1 hour
```
| @timestamp:date | client_ip:ip | event_duration:long | message:keyword |
| --- | --- | --- | --- |