時(shí)間:2024-02-05 11:03作者:下載吧人氣:23
公司里有一臺(tái)阿里云RDS數(shù)據(jù)庫(kù)用了PPAS(Postgres PlusTM Advanced Server),在處理日期/時(shí)間時(shí)遇到一些問題,花了點(diǎn)時(shí)間整理如下。
select now()
select current_timestamp
select localtimestamp
select clock_timestamp()
有時(shí)候,我們不需要這么完整細(xì)致的時(shí)間,自然就有
select current_date
select current_time
select localtime
老實(shí)說(shuō),這是見過(guò)最奇怪的一套時(shí)間計(jì)算的方式了。
select now() + interval ‘2 years’;
網(wǎng)友評(píng)論