About 178,000 results
Open links in new tab
  1. Extract date (yyyy/mm/dd) from a timestamp in PostgreSQL

    I want to extract just the date part from a timestamp in PostgreSQL. I need it to be a postgresql DATE type so I can insert it into another table that expects a DATE value. For example, if I …

  2. postgresql - Convert timestamp to DATE format (MM-DD-YYYY) …

    May 8, 2020 · The table value from where I'm fetching the data is timestamp but while returning I need to convert the timestamp to date format like MM-DD-YYYY while fetching the records.

  3. datetime - PostgreSQL date () with timezone - Stack Overflow

    Jun 20, 2012 · PostgreSQL always stores UTC time for the type timestamp with time zone internally. Input and output (display) are adjusted to the current timezone setting or to the …

  4. PostgreSQL : cast string to date DD/MM/YYYY - Stack Overflow

    I'm trying to cast a CHARACTER VARYING column to a DATE but I need a date format like this : DD/MM/YYYY. I use the following SQL query : ALTER TABLE test ALTER COLUMN date …

  5. PostgreSQL: how to convert from Unix epoch to date?

    Mar 13, 2019 · The statement gives me the date and time. How could I modify the statement so that it returns only the date (and not the time)? SELECT to_timestamp( TRUNC( CAST( …

  6. PostgreSQL: how to convert text date to show in the format of …

    Jan 2, 2024 · The requirement is to convert it to date (data type) and show it in the format of YYYY-MM-DD. The requirement is not to update the table, just query the table as the instruction.

  7. postgresql - How to cast Timestamp to Date - Stack Overflow

    Aug 30, 2019 · cannot change data type of view column "OrderDate" from timestamp without time zone to date Postgres 11 pgAdmin 4.9

  8. sql - Cast date to timestamp in pgSQL - Stack Overflow

    May 1, 2012 · 14 You can cast the date column to text and then concatenate with the time portion of the timestamp. In the query below I create a timestamp from the current date.

  9. postgresql - How to convert a string to timestamp in a desired …

    Mar 9, 2017 · SELECT to_timestamp(field1, 'YYYY-MM-DD hh24:mi:ss')::timestamp without time zone at time zone 'Etc/UTC' it converts the string to a value with the default timezone and then …

  10. How to convert unix timestamp column to date format in …

    Jun 14, 2019 · How to convert unix timestamp column to date format in PostgreSQL? Asked 6 years, 6 months ago Modified 4 years, 2 months ago Viewed 18k times