开发者

Oracle timestamp: change time value

I have a timestamp field in Oracle db with some date and time. I need to set time to be 00:00. Like '2011-开发者_StackOverflow09-01 17:55:00' -> '2011-09-01 00:00:00' Can you please advise optimal ways to do it?

Thanks!


Use the TRUNC() function, as in:

UPDATE table
SET timestamp_column = TRUNC(timestamp_column)
WHERE ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜