Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have YearWeek, which shows values as shown below, i want to separate this into two different columns.
1. Year 2. Month, Could you please help me , how to get Year seperatly and Month Speratley
WeekYear |
2021-01 |
2021-02 |
2021-52 |
2021-53 |
try below
Subfield(YearWeek,'-',1) as Year
Subfield(YearWeek,'-',2) as Month
the second value after '-' is actually week, but i want in Year as seperate field and Month as seperte field using YearWeek as source field
Hello,
use makeweekdate() to convert you week into date and then from date you can easily get month & year
try like
Month(makeweekdate(left(WeekYear,4),right(weekYear,2))) as Month,
left(WeekYear,4) as Year,
Regards,
Prashant Sangle
ThankYou Very Much PrashantSangle Sir
if it work for you then like that solution and select accept as solution.
Sure PrashantSangle Sir