TSQL: Most Recent Month End, Quarter End, and Year End

— return the last period end unless today is a period end
SET @date = GETDATE();

SELECT EOMONTH(@date + 1 , -1) AS most_recent_month_end
, DATEADD(QUARTER, DATEDIFF(QUARTER, 0, @date + 1) , -1) AS most_recent_quarter_end
, DATEADD(YEAR, DATEDIFF(YEAR, 0, @date + 1) , -1) AS most_recent_year_end


Informatica SQL Server Dates

The Informatica supports SQL Server date format.

One of the common problem is the conversion from string to date happening in Informatica Expression. Check the Session configuration for “DateTime Format String” first. The default format string is “MM/DD/YYYY HH24:MI:SS.US”. Make sure the string value has the same format.

Other Related Problems: