Getting first day of year Oracle SQL

SQL to get the first day of the current year:

 select trunc(sysdate,'YEAR') from dual; 

SQL to get the first day of the current month:

 select trunc(sysdate,'MON') from dual; 

SQL to get the last day of year:

 select add_months(trunc(sysdate,'YEAR'),11) from dual; 

Have fun 🙂

 

Advertisements

About Manikandan Surendren

A PeopleSoft Techno-functional Consultant. An engineering graduate in Computer Science. Technology Enthusiast. Movie freak. Gadget geek.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s