This function will return you the month-end date. Input parameter may be any date of that month for which you want to calculate month-end.
Input: '2-20-2004' Output: '2-29-2004'
Input: '2-15-2004' Output: '2-29-2004'
Input: '3-20-2004' Output: '3-31-2004'
Input: '3-30-2004' Output: '3-31-2004'
A Normalization Primer
For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.