1

I'm trying to credit a custom field which only need month and year (like credit card exp date)

I choose datetype date, when creating the field, but it also needs a date as well. How can I create a field that user only can input month and year, when they are creating a new record?

  • You have to handle it custom. Either take two different fields for month and year. Using one field is not possible. picklist will work fine for it. As you can see in online transaction month and year values are picklist only. After choosing both of them store it in some TEXT field may be comma or semi colon separated. Use 'split()' method to get month and year separately in your code. – Nupur Bhagat Oct 15 '18 at 6:29
4

I would create two picklists one for month and one for year.

This would mean you will need triggers or validation rules to validate the data .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.