In the interests of completeness, I submit this solution based on Solution 7 above:
--USE [cpqaAnswers]
--GO
--CREATE SCHEMA [cpqa] ... -- etc
CREATE FUNCTION [cpqa].[udf_IF_firstAndLast]()
RETURNS [nvarchar](256)
AS
BEGIN
DECLARE @firstDate [datetime]
SET @firstDate = (SELECT DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) AS [first])
--RETURN @firstDate
DECLARE @lastDate [datetime]
SET @lastDate =(SELECT DATEADD(DAY, -(DAY(DATEADD(month, 1, GETDATE()))),DATEADD(month, 1, GETDATE())) AS [Last])
--RETURN @lastDate
DECLARE @softBAReturn [nvarchar](256)
SET @softBAReturn = CONVERT([nvarchar],@firstDate,103) + ' --- ' + CONVERT([nvarchar],@lastDate,103)
RETURN @softBAReturn
END
Run that function in the following manner:
SELECT [cpqa].[udf_IF_firstAndLast]()
And that returns:
01/03/2013 --- 31/03/2013