MySQL获取当前日期、时间、时间戳函数_mysql date_sub 时间戳-CSDN博客
# 获取当前时间 curtime() mysql> select curtime(); +-----------+ | curtime() | +-----------+ | 10:39:25 | +-----------+ # 获取当前日期 curdate() mysql> select curdate(); +------------+ | curdate() | +------------+ | 2023-12-21 | +------------+ 1 row in set (0.08 sec) # 获取当前日期时间 now() mysql> select now(); +---------------------+ | now() | +---------------------+ | 2023-12-21 10:39:31 | +---------------------+ 1 row in set (0.05 sec) # 获取当前时间戳 unix_timestamp() mysql> select unix_timestamp(); +------------------+ | unix_timestamp() | +------------------+ | 1703126492 | +------------------+ 1 row in set (0.09 sec)
标签:set,MySQL,获取,日期,时间,mysql,sec,select From: https://www.cnblogs.com/daizichuan/p/17918476.html