PGSQL随心记

PG-SQL 随心记录

pgSQL 关于时间

  • PG-SQL 随心记录

  • 时间 00:00

SELECT DISTINCT to_char(a,‘HH24:MI’) dd FROM generate_series(‘2020-06-01’::date,‘2020-06-01’::Date+ interval ‘1 day’, ‘1 hours’) as a order by dd;


  • SELECT to_char(a,‘yyyy-MM-dd’)::date fulldate
    FROM generate_series(‘2020-06-01’::date,‘2020-06-01’::Date+ interval ‘1 month’, ‘1 days’) as a

你可能感兴趣的:(pgSQL)