Discussion on date datatypes and adddate functionality. #1491
Replies: 2 comments 2 replies
-
If you're using version 1.3, you should consider switching to 2.x. #722 was just recently closed and will be released completed in 2.6. Also, adddate was updated in December. Also, it looks like the date format for that field is |
Beta Was this translation helpful? Give feedback.
-
Use can use select adddate(cast(timestamp as date), INTERVAL 270 DAY) from opensearch_dashboards_sample_data_logs where response="503" and adddate(cast(timestamp as date), INTERVAL 270 DAY) >= STR_TO_DATE('2025-22-01', '%Y-%m-%d'); or without select adddate(cast(timestamp as date), INTERVAL 270 DAY) from opensearch_dashboards_sample_data_logs where response="503" and adddate(cast(timestamp as date), INTERVAL 270 DAY) >= '2025-01-22';
|
Beta Was this translation helpful? Give feedback.
-
@Yury-Fridlyand Can you help me with the below query.
Result
Questions:
adddate(cast(timestamp as date), INTERVAL 270 DAY) >= '2025-22-01'
cast(adddate(cast(timestamp as date), INTERVAL 270 DAY) as date) >= '2025-22-01'
oradddate(cast(timestamp as date), INTERVAL 270 DAY) >= DATETIME('2025-22-01')
response = 503
and not if I useresponse=45
as there are no documents related to response = 45. I guess thisBeta Was this translation helpful? Give feedback.
All reactions