Remove time zone and precision from PostgreSQL query results

Source: Internet
Author: User

Remove time zone and precision from PostgreSQL query results

I have been using PostgreSQL functions to piece together. Today I suddenly found that it can be so simple, just use timestamp (0) to solve it:

  1. Ls => select createtime: timestamp (0) without time zone from users;
  2. Createtime
  3. ---------------------
  4. 2015-10-03 01:32:03
  5. 2015-10-03 01:32:03
  6. 2015-10-03 01:32:03
  7. (3 rows of Records)
  8. Ls => select createtime: timestamp without time zone from users;
  9. Createtime
  10. ----------------------------
  11. 2015-10-03 01:32:03. 080415
  12. 2015-10-03 01:32:03. 080415
  13. 2015-10-03 01:32:03. 080415
  14. (3 rows of Records)

------------------------------------ Lili split line ------------------------------------

Install the PostgreSQL 9.3.5 database in Ubuntu Server 14.04

Install PostgreSQL 6.3 on yum in CentOS 9.3

PostgreSQL cache details

Compiling PostgreSQL on Windows

Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure phppgAdmin on Ubuntu

Install PostgreSQL9.3 on CentOS

Configure a Streaming Replication cluster in PostgreSQL

How to install PostgreSQL 7/6 and phpPgAdmin in CentOS 5/6. 4

------------------------------------ Lili split line ------------------------------------

PostgreSQL details: click here
PostgreSQL: click here

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.