Date and Time Shortcuts
The following table outlines the date and time shortcuts that you can use to define the start time, end time, and timestamp values in a query.
Time Segment | Meaning |
---|---|
now | Now (the time and date that you execute the query) |
today | Today at midnight |
yesterday | Yesterday at midnight |
mon | The previous Monday at midnight |
tues | The previous Tuesday at midnight |
wed | The previous Wednesday at midnight |
thurs | The previous Thursday at midnight |
fri | The previous Friday at midnight |
sat | The previous Saturday at midnight |
sun | The previous Sunday at midnight |
boy | First day of year at midnight |
eoy | Last day of year at midnight |
bom | First day of month at midnight |
eom | Last day of month at midnight |
Example 1: Set the Start Time to the First Day of the Month
SET starttime=bom
Example 2: Retrieve Messages Dated Today
SELECT * FROM ihmessages WHERE timestamp>=today