Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres get number of days between two dates

SELECT
  AGE('2012-03-05', '2010-04-01'),
  DATE_PART('year', AGE('2012-03-05', '2010-04-01')) AS years,
  DATE_PART('month', AGE('2012-03-05', '2010-04-01')) AS months,
  DATE_PART('day', AGE('2012-03-05', '2010-04-01')) AS days;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle group 
Sql :: checking data type in sql server 
Sql :: drop all triggers oracle 
Sql :: identify primary key in oracle table 
Sql :: check for directory in bash 
Sql :: update select mysql 
Sql :: ERROR 1064 (42000) 
Sql :: sql full outer join with where clause 
Sql :: sql update 
Sql :: mysql get max value and id 
Sql :: dbms_metadata.get_ddl table 
Sql :: postgres extract date from timestamp 
Sql :: database get 10 user aleatory 
Sql :: mysql dump for selected row 
Sql :: postgres delete by id 
Sql :: soql more than today 
Sql :: execut sql python 
Sql :: count in sql 
Sql :: mysql delete from where like 
Sql :: php insert null mysql 
Sql :: Add a new column into table 
Sql :: sql server update top n records 
Sql :: t-sql add column 
Sql :: sql check if table exists 
Sql :: DELETE DUPLICATE VALUES FROM A TABLE IN SQL SERVER 
Sql :: select only unique values from and to current table 
Sql :: stored procedure sql 
Sql :: carbon mysql d m y to y-m-d 
Sql :: how to check last index rebuild sql server 
Sql :: switch users mysql 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =