Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 01:26 AM
It will be like that if you manipulate seconds. As getdate() includes seconds, it will be that object, but if you make select typeof(getdate() + INTERVAL 1 DAY), it will be a timestamp.
Maybe having seconds as integer guaranteed from midnight will be the best:
select CAST(current_timestamp() AS INT) - CAST(timestamp(current_date()) AS INT)
My blog: https://databrickster.medium.com/