Java bro

Java tutorial

Sql queries

Get first date of next month in sql

In this article we wre going write a query to get first day of next month.

Query:

SELECT TO_CHAR( TRUNC(ADD_MONTHS(SYSDATE, 1), ‘MM’),’MM-DD-YYYY’) AS FIRST_DATE FROM DUAL ;

Output :

FIRST_DATE
02-01-2016

Comments are Closed

Theme by Anders Norén