+ 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 );