Activity Forums Salesforce® Discussions Formula to show if date field is within first half or second half of the month?

  • PRANAV

    Member
    August 26, 2016 at 11:09 am

    Hi Tanu,

    First make a custom field ( dateTest__c) of Formula Type and Formula return Type is Text then apply this formula
    Formula:
    IF(DAY( dateTest__c)>=15,
    (CASE(MONTH( dateTest__c), 1, "January", 2, "February", 3, "March",  4, "April",  5, "May",  6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "None") & " - " & "Second Half"),
    (CASE(MONTH( dateTest__c), 1, "January", 2, "February", 3, "March",  4, "April",  5, "May",  6, "June", 7, "July", 8, "August", 9, "September", 10, "October", 11, "November", 12, "December", "None") ) & " - " & "First Half")

    Formula will return the result August - First Half or August - Second Half.

    Please remember to replace dateTest__c with the API name of your custom date field .

     

    Hope this helps you.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos