Oracle execute with setting session variables

I would like to set date format and timestamp format for the session and run the select statement in oracle execute snap like this
execute immediate ‘alter session set nls_date_format=’‘MM/DD/YYYY’’’;
execute immediate ‘alter session set nls_timestamp_format=’‘MM/DD/YYYY HH:MI:SS’’’;
"Select * from " + $tableName + " Where updateDateYear >= " + $year
If I do this in 2 seperate oracle execute snaps , it is opening 2 seperate sessions
I want run this in single snap