Keyur Parekh 2 Posted February 12, 2017 Share Posted February 12, 2017 Hi All, Quick question - I want to create a calculated column to reflect month name as a string like "Jan", "Feb"... based on date coulumn, what is the formula for this I tried Month([Date Column]) and formatted it as string and I get the desired result however the data type of this column reflects integer even if it is formatted as string - this is creating issues with column matches from another data table due to integer/string conflict. Does anyone knows any other formula that simply convert date to month name "Jan", "Feb" as a string Thank you so much. Best, Keyur Parekh Link to comment Share on other sites More sharing options...
Manoj Singh Posted February 13, 2017 Share Posted February 13, 2017 Hello Keyur, Try the below things at your end to achieve your goal: Case when Month([date column])=1 then "Jan" when Month([date column])=2 then "Feb" when Month([date column])=3 then "Mar" when Month([date column])=4 then "Apr" when Month([date column])=5 then "May" when Month([date column])=6 then "Jun" when Month([date column])=7 then "Jul" when Month([date column])=8 then "Aug" when Month([date column])=9 then "Sep" when Month([date column])=10 then "Oct" when Month([date column])=11 then "Nov" when Month([date column])=12 then "Dec" end Hope it helps. Regards Manoj Singh Link to comment Share on other sites More sharing options...
Keyur Parekh 2 Posted February 14, 2017 Author Share Posted February 14, 2017 Thank you so much Manoj. Appreciate your help!! Link to comment Share on other sites More sharing options...
Anders Gavare Posted February 21, 2017 Share Posted February 21, 2017 Turning it into a string via concatenation with an empty string could work: "" & Month([Date]) 1 Link to comment Share on other sites More sharing options...
Jason Dai 3 Posted December 7, 2017 Share Posted December 7, 2017 Thanks! It works for me! Link to comment Share on other sites More sharing options...
Manoj Singh Posted December 7, 2017 Share Posted December 7, 2017 You are always welcome :) Link to comment Share on other sites More sharing options...
Karam Rai Posted October 25, 2018 Share Posted October 25, 2018 Hi Manoj, When I try this formula, the months get scrambled into a different order. When I go to the sort order to try and move them back into chronological order, it does not allow me to. Any insight as to why this may be happening Thanks, Karam Link to comment Share on other sites More sharing options...
Gonzalo Piotti Posted February 8, 2019 Share Posted February 8, 2019 Hi, it's better to cast to a Date and then apply formatting for example Date([Column])and then in apperance: MMM/yy gives you "Jan-19" Link to comment Share on other sites More sharing options...
Tiffany Lai Posted March 26, 2019 Share Posted March 26, 2019 Try DatePart('month', [YourDateColumn]) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now