MySQL和PostgreSQL日期格式化
MySQL:
select DATE_FORMAT(CURRENT_TIMESTAMP,'%Y-%m-%d %H:%i:%s') AS col1,CURRENT_TIMESTAMP as col2
PostgreSQL:
select to_char(CURRENT_TIMESTAMP,'yyyy-mm-dd hh24:mi:ss') AS col1,CURRENT_TIMESTAMP as col2
例:
select to_char(CURRENT_TIMESTAMP,'yyyy-MM') AS col1,CURRENT_TIMESTAMP as col2
相关推荐
89244553 2020-06-11
83911930 2020-03-23
WanKaShing 2020-11-12
zhbvictor 2020-10-29
kls00 2020-10-15
89921334 2020-07-29
83911930 2020-07-28
89407707 2020-06-27
89921334 2020-06-26
89244553 2020-06-21
84593973 2020-06-21
83911930 2020-06-16
yaoding 2020-06-14
89407707 2020-06-11
89921334 2020-06-10
89407707 2020-06-10
goodriver 2020-06-09
kevinli 2020-06-06