โ12-30-2024 09:43 PM
Hi everyone,
I have a Workato recipe that connects Salesforce with Google Drive.
In the recipe, Iโm creating Google Drive folders where the folder names are based on Contact names and their Date of Birth.
This setup works perfectly.
However, I want to change the Date of Birth format, which comes from the 'Date_of_Birth__c' Contact date field, from YYYY-MM-DD to MM-DD-YYYY.
How can this be achieved?
Solved! Go to Solution.
โ01-02-2025 05:18 AM
Hi @energidi ,
solution:
Image_1: If the incoming date field is of type Date, there is no need to convert it to Date again. However, make note of the brackets.
Image_2: If the incoming date field is of type String, it is required to convert the source field to Date (i.e., strftime works on the Date field).
Thanks and Regards,
Shivakumara Avadhani
โ12-31-2024 06:25 AM
There are several date formulas that can accomplish this.
โ12-31-2024 08:40 AM
Use this:
"2020-12-12".strftime("%m-%d-%Y")
โ12-31-2024 11:16 PM - edited โ01-01-2025 11:07 PM
Thank you, @gary1 !
The formula works perfectly when written as follows:
[Date_of_Birth__c]=.strftime("%m-%d-%Y")
(The 'Date_of_Birth__c' field is sourced from an output).
However, attempting the formula below, which is what I need, results in the error: Formula has errors
[ContactName__c]_[Date_of_Birth__c]=.strftime("%m-%d-%Y")
(The 'ContactName__c' field is sourced from an output).
Even after removing the underscore, the error persists.
โ01-02-2025 05:18 AM
Hi @energidi ,
solution:
Image_1: If the incoming date field is of type Date, there is no need to convert it to Date again. However, make note of the brackets.
Image_2: If the incoming date field is of type String, it is required to convert the source field to Date (i.e., strftime works on the Date field).
Thanks and Regards,
Shivakumara Avadhani