function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anilkumar KGAnilkumar KG 

Hello! Hope you all keeping well. I have field updates uses the Date (Expected_Delivery_Date__c) function. I want the date format should be in MM/DD/YYYY. I always believe this platform would have help me to get better understanding. Thank you in advance

Hello! Hope you all keeping well.
In Order Obj (Salesforce). I have field updates uses the Date (Expected_Delivery_Date__c) function. I want the date format should be in MM/DD/YYYY.
I tried 
IF( LEN( DATE(year,month,day) (MONTH( Expected_Delivery_Date__c ))) > 1 ,  DATE(year,month,day) (MONTH( Expected_Delivery_Date__c )), "0" +  DATE(year,month,day) (MONTH( Expected_Delivery_Date__c ))) + "-" + IF(LEN( DATE(year,month,day) (DAY( Expected_Delivery_Date__c ))) > 1 ,  DATE(year,month,day) (DAY( Expected_Delivery_Date__c })), "0" +  DATE(year,month,day) (DAY( Expected_Delivery_Date__c ))) + "-" +  DATE(year,month,day) (YEAR(date__c)) 
but showing an error - Syntax error ')'
I always believe this platform would help me to get better understanding.
Thanks in advance  
PriyaPriya (Salesforce Developers) 

Hi Anil,

Can you provide more detail of your requirment for better understanding?

I assume you wanted to save the record if the date entered in the format MM/DD/YYYY. 

If above is the case, then you can write validation rule and use the regex function. Also refer the below sample example to understand the use of Regex function :- 

https://developer.salesforce.com/forums/?id=9062I000000DN4oQAG

If it resolve your issue, please mark it as best answer.

regards,

Priya Ranjan