Im calling a SQL stored procedure from a piece of C#.net code:
SqlHelper.ExecuteDataset(sqlConnection, CommandType.StoredProcedure, STORED_PROC_NAME, sqlPara
You can pass the DBNull.Value into the parameter's .Value property:
DBNull.Value
SqlParameters[0] = new SqlParameter("LedgerID", SqlDbType.BigInt ); SqlParameters[0].Value = DBNull.Value;
Just adjust for your two DateTime parameters, obviously - just showing how to use the DBNull.Value property value here.
Marc