If this argument is specified, then EOMONTH adds the specified number of months to start_date, and then returns the last day of the month for the resulting date. If this addition overflows the valid range of dates, then an error is raised. Return Type. date. Remarks. This function can be remoted to SQL Server servers and higher. Create a Function for Start and End Dates. 0. I want to create a function that returns a start and end date for the archive//05/20/t-sql-user-defined. I would like to display the week ending date and like that to T-SQL display week ending dat when using how to setup datepart set sql start date and end date. 0.