Retrieving month value from date field in apex class/Trigger
In two ways we can capture month value from date field:
date_fieldname__c.month()
Which returns 1,2,3.... integer values
string.valueof(date_fieldname__c).substring(5,7)
Which return '01','02','03'.... string values
No comments:
Post a Comment