SAMUT Fabrice Posted August 16, 2021 Share Posted August 16, 2021 Hi there, I've a got column named Month in this format : "september-2020" and I want to switch it it like this : "2020-M09" Could you please tell me how to do that,please Also, is it possible to switchthe column Month in a week column with this format : W1020 for week 10 of the year 2020 Thank you Link to comment Share on other sites More sharing options...
Ajinkya Gutti Posted August 30, 2021 Share Posted August 30, 2021 Since this a specific non-standard date format you can achieve the desired output by using a combination of certain functions. 1. First you will need to convert you date to dateTime format. 2. Then to get specific part of the date out you can use dateTime functions. Ex. week([DateTime]) - returns the week number. 3. Lastly using string functions to get your desired format. 'W10' - > concat('W', string(week([DateTime])) Hope this helps! 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