OMG a magic formula – real facepalm moment

OMG a magic formula – real facepalm moment

Ok, so we’ve all been there. We’ve all needed to pad numbers especially for dates, months are the worst, they kill when you have a mix of one and two digit numbers. While building my latest date dimension I had to combine year and week number to form a column, I’ll not bore you with everything but adding a “0” to pad out those one digits had to be done to make it all work. I looked and I looked and then BOOOM! I found it!

Then today I needed it again for something else, so my advice is write it down, store it keep it close to you, it’s going to be one of those things you use loads during key times then you’ll not touch it for months, days or hours?



Read more