Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql get date now

If you want get the current date and time without timezone, you can cast it explicitly as follows:

SELECT NOW()::timestamp;
            now
----------------------------
 2017-03-17 18:37:29.229991
(1 row)
Code language: SQL (Structured Query Language) (sql)
Comment

postgres datetime now

/*
The NOW() function returns the current date and time.
The return type of the NOW() function is the timestamp with time zone.
See the following example:*/

SELECT NOW();
/*-------------------------------*/
2017-03-18 08:21:36.175627+07
/*
Note that the NOW() function returns current date and time based on
the database server’s time zone setting.*/
Comment

postgresql get date now

SELECT NOW();
              now
-------------------------------
 2017-03-18 08:21:36.175627+07
Comment

PREVIOUS NEXT
Code Example
Sql :: regex mongoose 
Sql :: MYSQL select last query 
Sql :: how to rename a database in tsql 
Sql :: reseed sql table primary key 
Sql :: Alter table add column in SQL Server- NAYCode.com 
Sql :: insert output identity 
Sql :: mac install mysql 
Sql :: SQL Auto Increment Primary Key - SQL Server 
Sql :: add primary key with auto increment sql server 
Sql :: postgres cast as decimal 
Sql :: sql trim whitespace 
Sql :: oracle desc table primary key 
Sql :: mysql update column default value CURRENT_TIMESTAMP error 
Sql :: How do I add a user to a postgres database? cli 
Sql :: rename table column postgresql 
Sql :: run sql file in terminal 
Sql :: sql function 
Sql :: sql only five first row 
Sql :: check duplicate values plsql 
Sql :: mysql dump specific tables 
Sql :: remove unique key from a table 
Sql :: python pandas df to postgres json table 
Sql :: sql server change schema of a table 
Sql :: SQL Server lock table example 
Sql :: select random sql 
Sql :: oracle percentage 
Sql :: drop all tables in azure sql database 
Sql :: empty table sqlite 
Sql :: mysql like case sensitive 
Sql :: mysql get first n characters of string 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =