Find first and last day of current month in sql server
Answer Posted / Mohd Yameen
To find the first and last day of the current month in SQL Server, you can use EOMONTH function:nn```sqlnSELECT EOMONTH(GETDATE()) + 1 AS LastDayOfMonth,n EOMONTH(GETDATE()) + 1 - DATEPART(DAY, GETDATE()) AS FirstDayOfMonth;n```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When should you use an instead of trigger?
What is the primary use of the model database?
Can we shrink data file in sql server?
What is subquery? Explain the properties of a subquery?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What is temporary table in sql server? Why we use temp table?
How do I find query history in sql server?
List out the different types of locks available in sql server?
Does view occupy space?
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What is a scheduled job or what is a scheduled task?
Can sql servers link to other servers like oracle?
What are the different types of subquery?
How can I check that whether automatic statistic update is enabled or not?