Java bro

Java tutorial

Sql queries

Get last date of month in sql

In this article we wre going write a query to find last date of the current month. See the below query.

Query:

SELECT TO_CHAR(TRUNC(LAST_DAY(SYSDATE)),’MM-DD-YYYY’) AS LAST_DATE FROM DUAL ;

Output :

LAST_DATE
03-31-2016

Comments are Closed

Theme by Anders Norén