• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🖤 BLACK FRIDAY DEALS ARE NOW LIVE! 🖤

    🔥 Enjoy an exclusive 10% discount on our LTD Plan — first-time ever offer!

    🚀 Unlock the Pabbly Plus Unlimited Yearly Plan and get unlimited access to every Pabbly application at a truly unbeatable Black Friday price.

    👉 Grab the Black Friday Offer

Facebook date format changing on the same leadform

Status
Not open for further replies.

Map

Member
Your Workflow URL
https://connect.pabbly.com/workflow/mapping/IjU3NjYwNTY0MDYzMTA0Mzc1MjZjNTUzNTUxMzYi_pc
Your Task History ID
IjU3NjUwNTZhMDYzMzA0M2Q1MjZjNTUzNTUxMzY1MTZhNTQzODBmMzci_pc
Consent to Access & Modify
I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
Hi,

I am wondering why Facebook sends us leads with different date format for the same FORM ID. Is there something that we can do on our side ?
 

Preeti Paryani

Well-known member
Staff member
Hello @Map,

Could you please share the specific task history IDs where you noticed the date being received in a different format from Meta’s end? Additionally, kindly confirm the exact field in which this date is being captured. If possible, sharing a screenshot would also help us understand the issue better.
 

Map

Member
Sure,

Here is a correct task ID : IjU3NjUwNTZhMDYzMDA0Mzc1MjZmNTUzNzUxMzM1MTYzNTQzMTBmMzMi_pc

Exact field :
Res4 Dob

Correct DATE FORMAT received :
01/27/1957
MM-DD-YYYY

1763726123837.png



------------------------------------------------------------------------------------------------------------------
INCORRECT TASK ID : IjU3NjUwNTZhMDYzMzA0M2Q1MjZjNTUzNTUxMzY1MTZhNTQzODBmMzci_pc
Res4 Dob1936-07-08
YYYY-MM-DD I guess.
1763726020908.png

Both data is received from the same form ID : 2266315310557006
 

Preeti Paryani

Well-known member
Staff member
Hello @Map,

Thank you for sharing the task history details.

Upon checking, the Res4 DOB field appears to be a free-text field on your form. This means the user filling the form can enter the date in any format, which is why you are receiving different formats such as MM/DD/YYYY in one instance and YYYY-MM-DD in another.

To maintain consistency, please update your form by adding a placeholder or help text showing the exact date format users should follow. This will guide respondents and help ensure the same format is submitted every time.
 

Map

Member
Hi,

We didn't found that Res4 DOB field appears to be a free-text field on our form. We selected a birthdate parameter in FB lead form creation. Is there any chance to add a rule for those leads which comes with "-" between numbers ? We found that they only come with the same date format : YYYY-MM-DD. We would like to apply a rule like "if the lead contains "-" between days or months or years, format the date into "DD/MM/YYYY"
 

ArshilAhmad

Well-known member
Staff member
You can add this Python code to your workflow, which will automatically convert the date format from YYYY-MM-DD to DD/MM/YYYY. If the date is already in DD/MM/YYYY format, it will return it as it is.


Python:
from datetime import datetime

def convert_date_format(date_str):
    try:
        # Try parsing YYYY-MM-DD
        parsed = datetime.strptime(date_str, "%Y-%m-%d")
        return parsed.strftime("%m/%d/%Y")
    except ValueError:
        pass

    try:
        # Try parsing MM/DD/YYYY — if valid, return as is
        parsed = datetime.strptime(date_str, "%m/%d/%Y")
        return date_str
    except ValueError:
        pass

    # If neither format matches, return as-is or raise an error
    return date_str

# Examples
print(convert_date_format("2025-11-25"))  # → 11/25/2025
print(convert_date_format("11/25/2025"))  # → 11/25/2025

Thanks & Regards,
Arshil Ahmad
Customer Support Associate
🌐 Pabbly.com
👉Rate your support
 

Map

Member
Ok thanks, very interesting. Could you check on this task history ID please ? IjU3NjUwNTZhMDYzZTA0MzQ1MjZjNTUzNjUxMzU1MTYzNTQzNjBmMzki_pc It did not work.
 

Preeti Paryani

Well-known member
Staff member
Hello @Map,

We have made some adjustments to the code, and it seems to be working fine now. Please map its response in the required step and let us know how it goes.
 
Status
Not open for further replies.
Top