Support » Plugin: Gravity Forms Salesforce Add-on » Date format issue for birthdate

Viewing 4 replies - 1 through 4 (of 4 total)
  • themightyant

    (@themightyant)

    Hi Stefan, did you ever fix this?
    I have the same problem and any assistance would be helpful.

    Stefan

    (@stefan83)

    I had to modify the saleforce plugin directly to make the date in format dd/mm/yyyy. By default the date is in US format.

    Plugin Contributor Zack Katz

    (@katzwebdesign)

    It’s in the FAQ. You can use:

    add_filter('gf_salesforce_format_date', 'modify_gf_salesforce_format_date');
    
    /**
     * The default is US-style,  though Salesforce recommends Y-m-d\'\T\'H:i:s
     * You can use any date formatting as shown here:
     * @link  http://php.net/manual/en/function.date.php
     */
    function modify_gf_salesforce_format_date($previous = '') {
        $date_format = 'Y-m-d\'\T\'H:i:s';
        return $date_format;
    }
    

    Hello. Unfortunately I can’t get that code to work in the site. When changing the code for British date format it doesn’t send the date to Salesforce. Here is the code I’m using. Can you see anything wrong with it? Thanks for your help…

    add_filter('gf_salesforce_format_date', 'modify_gf_salesforce_format_date');
    
    /**
     * The default is US-style,  though Salesforce recommends Y-m-d\'\T\'H:i:s
     * You can use any date formatting as shown here:
     * @link  http://php.net/manual/en/function.date.php
     */
    function modify_gf_salesforce_format_date($previous = '') {
        $date_format = 'd-m-Y\'\T\'H:i:s';
        return $date_format;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Date format issue for birthdate’ is closed to new replies.