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
sureshvepurisureshvepuri 

Enter Date format only in a custom text field

 

        Hi Community,

 

                                 i have a custom text field but can i enter date format

 

                                 only? How to write a validation rule please help me

 

                                 with a sample code.

 

 

 

  Thank you in Advance.

SuperfellSuperfell

If you want only dates in there, any reason why you can't just make it a custom date field instead of a text field ?

streetstreet

You can....  convert dateformat to string.

 

Foe Eg: you have DATE IN Date__c then 

 

textfiled = string.valueof(Date__c );