12-30-2024 06:12 AM
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?
01-06-2025 01:31 PM
3 weeks ago
Hi @energidi ,
you can change the format using date formula .strftime("MM-DD-YYYY") and .to_date(format: "MM-DD-YYYY")
3 weeks ago
Hi @Obugari ,
Correction:
Using to_date will not produce the desired output in this case, as it is specifically designed to convert input data into a date format and returns it as YYYY-MM-DD. If you run the formula as suggested earlier, it will result in an error.
Preferred Solution:
Instead, using strftime is recommended. It allows you to format the date into any desired output format, giving more flexibility to meet end-user requirements.
Conclusion:
Thanks and Regards,
Shivakumar K A
2 weeks ago
Hi @shivakumara ,
Thanks for clarification , but in workato docs they have mentioned we can use the format also. I will try that and let you know on this