It is possible to calculate first and last day of the previous month by using built-in EOMONTH()
T-SQL function.
You can do the calculations inside the stored procedure via T-SQL. Just pass a single DATE parameter: @givenDate
SQL
DECLARE @givenDate DATE = '2021-04-27';
SELECT EOMONTH(DATEADD(month, -1 , @givenDate)) AS 'Last Day of the Previous Month';
SELECT DATEADD(DAY, 1, EOMONTH(DATEADD(month, -2 , @givenDate))) AS 'First Day of the Previous Month';
UPDATE
SSIS Expressions are not powerful enough for this task. It is much easier to use SSIS Script Task for it. You can use c# below as a starting point. Just assign its outcome to two SSIS variables, and pass them as parameters to Oracle stored procedure.
c#
void Main()
{
DateTime today = DateTime.Today;
DateTime monthStart = new DateTime(today.Year, today.Month, 1);
DateTime FirstDayofthePreviousMonth = monthStart.AddMonths(-1);
DateTime LastDayofthePreviousMonth = monthStart.AddDays(-1);
Console.WriteLine("FirstDayofthePreviousMonth='{0}', LastDayofthePreviousMonth='{1}'"
, FirstDayofthePreviousMonth.ToString("dd-MMM-yyyy")
, LastDayofthePreviousMonth.ToString("dd-MMM-yyyy"));
}
Output
FirstDayofthePreviousMonth='01-Jan-2021', LastDayofthePreviousMonth=31-Jan-2021