【PGSQL】常用时间函数

# select now()
# 2024-01-15 15:55:50

# select current_date
# 2024-01-15

# select current_time
# 15:57:27

# select current_timestamp
# 2024-01-15 15:57:38

# select current_date + interval 1 DAY
# 2024-01-16

# select current_date + interval 1 WEEK
# 2024-01-22

# select current_date + interval 1 MONTH
# 2024-02-15

# select current_date + interval 1 YEAR
# 2025-01-15

# select current_time + interval 1 second
# 16:06:49

# select current_time + interval 1 minute
# 16:07:38

# select current_time + interval 1 hour
# 17:06:25

# select NOW() + interval 1 DAY
# 2024-01-16 16:04:59

你可能感兴趣的:(数据库)