Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a field called Yearmonth that starts from 201801 and goes up to this month.
I want to construct a dual so that 201801 = 1, 201802 = 2 , ... up until the last month in the dataset. Where the dataset gets updated every month.
Can somebody help me with this?
Kind regards,
num(left(Yearmonth,4))-2018 + num(right(Yearmonth,2)) should do the job, I think.
Floor(Yearmonth/100)-2018 + mod(Yearmonth,100) should also work if you prefer mathematical functions to string functions.
Hello Or,
thanks for the quick reply, still got a small problem. when i try it this is what i get in return
num(((left([yearmonth],4))-2018)*12) + num(right([yearmonth],2)))
still a small error in the year 2018, but the rest of the data works, and i dont really need to use the 2018 data. So thank you for helping