Answers for "date format postgresql"

SQL
4

datepart postgres

SELECT date_part('day', TIMESTAMP '2001-02-16 20:38:40');
Result: 16

SELECT date_part('hour', INTERVAL '4 hours 3 minutes');
Result: 4
Posted by: Guest on January-13-2020
1

postgres format date in select

select pg_catalog.concat(current_date,' 00:00:00')::timestamp /*Formata hora por exemplo no where*/

and plan_signed_at = TO_CHAR(created_at, 'YYYY-mm-dd')::timestamp /*Formata hora por exemplo no where um é date, o outro datetime*/

select  NOW() - INTERVAL '180' MINUTE /*pega a data e hora com 3 horas menos*/

select to_char(NOW(), 'yyyy/MM/dd HH24:MI:SS') AS date_no_tz, NOW() as date_tz /*data formatada com e sem timezone*/
Posted by: Guest on September-20-2021
1

postgre query date

SELECT * FROM data WHERE date = '2020-12-21'
Posted by: Guest on September-15-2020

Code answers related to "date format postgresql"

Code answers related to "SQL"

Browse Popular Code Answers by Language