Casting leading zeroes for a date
I can’t take credit for this – I was walking down this road and needed to find a way to handle the leading zeros on the cast so I went online, but it’s a nice way to get a current date in a YYYYMMDD format. select substr(char(year(current date)),1,4)|| case when Continue Reading →