Creating a function within functions.php to change the date

You can use the PHP’s strtotime() and WordPress’s date_i18n() functions:

function MY_FUNCTION( $input ) {
    // Removes commas so that we'll get the proper timestamp. Otherwise, the
    // strtotime() function would return FALSE.
    $input = str_replace( ',', '', $input );

    // Retrieve the UNIX timestamp of the date.
    $timestamp = @strtotime( $input );

    // Returns the date in *localized* format.
    return date_i18n( 'Y/m/d', $timestamp );
}

MY_FUNCTION( 'September, 15th 2018' ), for example, would give you 2018/09/15.