EOMONTH function in SQL Server 2012
Dear Friends,
A few weeks ago, I was writing some stored procs in SQL Server and I found this EOMONTH function handy.
This is a new function in SQL Server 2012
EOMONTH function takes a date argument/parameter and returns the last day of that month.
Quite handy.
Please refer to this technet article below for detailed syntax and some examples
http://technet.microsoft.com/en-us/library/hh213020.aspx
And if you would like to know how to achieve this in previous versions of SQL, have a look at the below link.
http://www.sql-server-helper.com/tips/tip-of-the-day.aspx?tkey=49ffa5c2-03a3-4888-aac2-a80320f2faf4&tkw=last-day-of-the-month-function
Btw, in AX, we have an equivalent dateEndMth function in Global class for the above purpose.
Happy Querying :)
与本文相关的文章
- 安装 ExFlow ISV 时出现的问题/Issue while installing ExFlow ISV
- D365: 如何在 X++ 中获取最后一个工作流程审批人/D365: How to get last workflow approver in X++
- 如何在 D365 F&O 中手动创建物料批次/How to create Item Batch manually in D365 F&O
- D365FO: 通过 X++ 中获取用于显示的维度值/D365FO: Get dimension display value in X++
- D365: When and how to use postLoad() method
- Consignment Inventory Handling in D365 Finance and Operations