Search
 
SCRIPT & CODE EXAMPLE
 

SQL

apex add months to date

SELECT sysdate + 1 FROM dual; 				-- Tomorrow    12/01/2021 14:27:27
SELECT trunc(sysdate) + 1 FROM dual; 		-- Tomorrow    12/01/2021 00:00:00
SELECT sysdate + INTERVAL '20' DAY FROM DUAL;		-- 20 days ahead (other way)
SELECT sysdate + 1 / 24 FROM dual;					-- 1 hour ahead
SELECT sysdate + 1 / 24 / 60 FROM dual;				-- 1 minute ahead
SELECT add_months(trunc(sysdate), 1) FROM dual;   	-- 1 month ahead (no time)
SELECT trunc(sysdate) + 30 FROM dual;				-- 30 days ahead (no time)
SELECT add_months(trunc(sysdate), +12*2) FROM dual;	-- 2 years ahead (no time)
Comment

apex add months to date

(+/-)(n)(d/w/m/y)

	-1d or +1d date before or after 1 day of the current date
	-1w or +1w date before or after 1 week of the current date
	+2m date after two months of the current date
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql create table with boolean column 
Sql :: oracle sql day of month from date 
Sql :: postgres add superuser to database 
Sql :: sqlserver create table from select 
Sql :: différence entre deux dates sql oracle 
Sql :: drop all foreign key constraints mysql 
Sql :: oracle current sequence value 
Sql :: mysql reset auto increment to 1 
Sql :: sql insert query 
Sql :: sql insert timestamp 
Sql :: get first 3 letters in sql 
Sql :: sql myisam vs innodb 
Sql :: script to add new column in table sql 
Sql :: mysql round 
Sql :: sql alchemy with azuresql server 
Sql :: how to define a composite primary key in sql 
Sql :: oracle asynchronous procedure 
Sql :: turn off safe mode mysql 
Sql :: best sql course 
Sql :: get all db sizes in mysql server 
Sql :: sql like 
Sql :: sql update from different table 
Sql :: wordpress print query sql 
Sql :: MySQL shutdown unexpectedly. 
Sql :: create database hive 
Sql :: mysql remove duplicates 
Sql :: postgres group by 10 minute intervals 
Sql :: how to add CHECK constraint to a column in postgres 
Sql :: mysql date time string format python 
Sql :: float precision in psql 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =