Articles → SQL SERVER → Eomonth Function In SQL Server

Eomonth Function In SQL Server






Purpose





Syntax


eomonth(start_date, [offset])




  1. The start_date parameter specifies the specific date for which the last day of the month is returned
  2. The offset is an optional parameter that adds the number of months in the start_date

Example


select eomonth(getdate())select eomonth(getdate(), 3)



Output


Picture showing the output of eomonth function in sql server





Posted By  -  Karan Gupta
 
Posted On  -  Thursday, February 23, 2023

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250