SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Function to calculate Month End Date

By Hari Sharma, 2007/05/08

Total article views: 908 | Views in the last 30 days: 18

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.
Example:
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'

By Hari Sharma, 2007/05/08

Total article views: 908 | Views in the last 30 days: 18
Your response
 
 
Related Articles
FORUM

Merge Inputs Several Rows but no Output

Merge has Input but no Output

FORUM

Parameter passing

Input and output parameter

FORUM

passing out put of one sql statement into another as a input and looping using cursor

Output value is passed as input for othe sql statement and looping and selecting the vlaue

FORUM

Error Output Properties Do Not Match

Cannot change Input or Output properties because they then won't match the Error Output

FORUM

Display Month wise data

Dynamic month column

Tags
t-sql aids    
 
Contribute

Free registration required...

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Login (existing users)

Login

Email:   Password:   Remember me: Forgotten your password?

Register (new users)

Register

Email:   Password:
Confirm:

Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

Steve Jones
Editor, SQLServerCentral.com