How to generate Registration no

Add this in functions.php

This will automatically add a custom field to a user when they register on your site with a key of: user_registration_no

 add_action('user_register', 'add_user_registration_number');
    function add_user_registration_number ($user_id) {
        $reg_number = date('y').date('m').'SY'.'0'.$user_id;
        update_user_meta($user_id, 'user_registration_no', $reg_number);
    }

This should be formatted in the way in which you specified..