Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Nirupama Sharma

# Formula to Auto Populate the Start Date and End Date Based on the Month

Hello all

I am Trying to Design a Formula where i have Custom Picklist Field called ('Months') where it Contains all 12 months name, Now my Requirement is that when Any Month is Selected, Start Date and End Date Should Auto populate based on Month,

Ex - If i Choose Janaury, Start Date and End Date of January Should Auto Populate in the thosed Custom Fields, How Do i Achive this Functionality
Carljohnson
Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing. If you have interest in games then visit this amazing website for cheats and commands –gtacheatcode and click here for Latest GTA 5 Cheats Xbox 360.
Jakub Kołodziej 7
For the first day of the month:

DATE(
YEAR(TODAY()),
MONTH(Picklist field),
1
)

For the last day of the month:
DATE(
YEAR(TODAY()),
MONTH(picklist field) + 1,
1
) - 1

In picklist field you should have number of month, so create formula for that or write longer formula in above : IF(TEXT(formula)=january,1,IF.....
@Jakub

As you Mentioned i have put the Formula Field for Start Date As Return Type as Date, it is  Throwing Error saying "Error: Field Months__c is a picklist field. Picklist fields are only supported in certain functions"
Jakub Kołodziej 7
First day:
```DATE(
YEAR(TODAY()),
CASE(TEXT(Months__c),
"January", 1,
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June",6,
"July", 7,
"August",8,
"September", 9,
"October", 10,
"November", 11,
"December", 12,
0),
1
)```
Create similiar for last day of month
Nirupama Sharma
@Jakub

its working fine for Fiirst Day and Last Day, Now when i give None for Months it shows blank Value, i need to Assign  N/A for Both Start date and End Date when None is Selected, how do i do that

hemrustan wimlest
Henry Ford Hospital establish on the location at 2799 West Grand Boulevard Detroit, Michigan 48202, Wayne County, Michigan, the U.S. which has 877 beds and founded in 1915.

Jakub Kołodziej 7
IF(ISNULL(Months__c),N/A, rest of the code)
But if u want letters N/A your formula should be text and you have to convert date to text
john nic 1

To calculate end date based on given start date and number of years, please apply this formula: Enter this formula: =DATE(YEAR(A2)+B2,MONTH(A2),DAY(A2)) into cell C2, and drag the fill handle down the cells that you want to apply this formula, and all end dates have been calculated.
https://www.prepaidcardstatus.mobi/
Manju053
@Jakub

@Steve

i am also having the same issue like Adhithi is having, But i have Modified my Formula, its Showing Correctly for Months, Now i want to add Years also clalled Quota Year(Picklist) field which is from 2020 - 2030, so when i give Quota Year and Month, the Quota Start date and Quota End Date should show based on the Quota Year and Month,

```Quota Start Date

DATE(
YEAR(TODAY()),
CASE(TEXT(Month__c),
"January", 1,
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June",6,
"July", 7,
"August",8,
"September", 9,
"October", 10,
"November", 11,
"December", 12,
0),
1
)```

```Quota End Date

DATE(
YEAR(TODAY()),
CASE(TEXT(Month__c),
"January", 1,
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June",6,
"July", 7,
"August",8,
"September", 9,
"October", 10,
"November", 11,
"December", 12,
0),
1
)```

Now i Want to Include Quater Year Picklist where it should show based on the Year Also
Jakub Kołodziej 7
Last day of month formual shuld be:

```DATE(
YEAR(TODAY()),
CASE(TEXT(Month__c),
"January", 2,
"February", 3,
"March", 4,
"April", 5,
"May", 6,
"June",7,
"July", 8,
"August",9,
"September", 10,
"October", 11,
"November", 12,
"December", 1,
0),
1
)-1```

If you want to set year dynamically from picklist just change line Year(TODAY()), to YEAR(Custom_field__c),

Manju053
@Jakub\

Yes i  tried that, its throwing an error

Jakub Kołodziej 7
Try YEAR(VALUE(Quarter_Year__c) )or YEAR(VALUE(TEXT(Quarter_Year__c)))
rohit Singla
oh its really nice, i am thankful to you. i was trying another formula. but its was not working. guys if you are interesting in watch movie at no cost try CyberFlix TV (https://cyberflixtvapk.info/)
Eazl Frank
https://topsitesurlfree.blogspot.com/  (https://topsitesurlfree.blogspot.com/ )
https://remote-employers.blogspot.com/  (https://remote-employers.blogspot.com/ )
https://remote-jobs-finder.blogspot.com/  (https://remote-jobs-finder.blogspot.com/ )
https://amazon-job.blogspot.com/  (https://amazon-job.blogspot.com/ )
https://best-jobs-finder.blogspot.com/  (https://best-jobs-finder.blogspot.com/ )
https://find-jobs-for-free.blogspot.com/  (https://find-jobs-for-free.blogspot.com/ )
https://goldman-sachs-jobs.blogspot.com/  (https://goldman-sachs-jobs.blogspot.com/ )