Forum Discussion
RahulCholate
Aug 10, 2022Copper Contributor
Using Text function to obtain "Months"
Hi Guys, I am Rahul from India. I want to obtain "Months" (January, February,--etc) using Text function: =Text((1/13/19,"mmmm")) (US Date format) I am unable to get the answer; =>Whereas, I...
- Aug 10, 2022
Nice approach. Using the same idea:
=INDEX(TEXT(DATE(2022,SEQUENCE(12),1),"mmmm"),LEFT(A1,FIND("/",A1)-1))
HansVogelaar
Aug 10, 2022MVP
If you have a date in a cell, say A1, you can use =TEXT(A1,"mmmm")
If you want to specify a literal date, use the DATE function: =TEXT(DATE(2019,1,13),"mmmm")
- RahulCholateAug 10, 2022Copper ContributorThanks for you reply Hans,
But how should i convert from format (1/13/19) to a proper Date format, so that i could apply Text function? My complete Dataset consists of improper Date format (1/13/19)!!
Hope i made you clear in understanding.- LorenzoAug 10, 2022Silver Contributor
Alternatively, with your improper date in A1 (assuming Excel 2021 or 365):
=LOOKUP(--LEFT(A1, SEARCH("/",A1)-1), SEQUENCE(12), TEXT(DATE(2022,SEQUENCE(12),1),"mmmm"))- HansVogelaarAug 10, 2022MVP
Nice approach. Using the same idea:
=INDEX(TEXT(DATE(2022,SEQUENCE(12),1),"mmmm"),LEFT(A1,FIND("/",A1)-1))
- HansVogelaarAug 10, 2022MVP
Try
=LET( Input,A1, Space1,FIND("/",Input), Space2,FIND("/",Input,Space1+1), Year,MID(Input,Space2+1,4)+2000, Month,LEFT(Input,Space1-1), Day,MID(Input,Space1+1,Space2-Space1-1), Date,DATE(Year,Month,Day), TEXT(Date,"mmmm") )- RahulCholateAug 10, 2022Copper ContributorThank you Hans for the input.