return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>snowflake cloud data platform - Need to truncate a timestamp and add a minute to it in SQL - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

snowflake cloud data platform - Need to truncate a timestamp and add a minute to it in SQL - Stack Overflow

programmeradmin2浏览0评论

I have a timestamp that goes into seconds. I want to truncate the time at the minutes (leaving off the seconds), and then i want to add a minute to that.

Example timestamps: 3001-01-01T07:59:00Z and 3001-01-01T07:59:59Z

My end goal is to have this time stamp be: 3001-01-01T08:00:00Z

I have the part to add the minute, but can't figure out the truncate part.

DATEADD(MINUTE,1, order.term_end::TIMESTAMP) AS "TermEnd"

I have a timestamp that goes into seconds. I want to truncate the time at the minutes (leaving off the seconds), and then i want to add a minute to that.

Example timestamps: 3001-01-01T07:59:00Z and 3001-01-01T07:59:59Z

My end goal is to have this time stamp be: 3001-01-01T08:00:00Z

I have the part to add the minute, but can't figure out the truncate part.

DATEADD(MINUTE,1, order.term_end::TIMESTAMP) AS "TermEnd"
Share Improve this question asked Mar 18 at 19:11 suzysuzy 215 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Looks like you're looking for DATE_TRUNC.

DATE_TRUNC('minute', order.term::TIMESTAMP)
发布评论

评论列表(0)

  1. 暂无评论