Java bro

Java tutorial

Sql queries

Get the day number in year in sql

In this article we wre going write a query to find day number of current date in year. See the below query.

Query:

SELECT TO_CHAR( TRUNC(SYSDATE),’DDD’) AS DAY_IN_YEAR FROM DUAL ;

Output :

DAY_IN_YEAR
067

Comments are Closed

Theme by Anders Norén