WordPress.org

Forums

Gravity Forms Salesforce Add-on
[resolved] Date format issue for birthdate (5 posts)

  1. Stefan83
    Member
    Posted 1 year ago #

    Hi - I'm using the Date field for date of birth. The format I'm using is DD/MM/YYYY. The field format in SF is DD/MM/YYYY. However, the result in Salesforce is MM/DD/YYYY. If the DD is greater than 12, nothing displays in SF because its not validating. Is there a way I can fix this?

    https://wordpress.org/plugins/gravity-forms-salesforce/

  2. themightyant
    Member
    Posted 1 year ago #

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

  3. Stefan83
    Member
    Posted 1 year ago #

    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.

  4. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    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;
    }
    
  5. calzo
    Member
    Posted 11 months ago #

    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;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms Salesforce Add-on
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.