since the RTC1307 clock module gives its output data in bcd why not just
lcdout hex2 reg_val[3]

also if you need to use it as a binary/dec number for comparisons etc.
day = ((reg_val[3] >> 4) * 10) + (reg_val[3]$0f) ; bcd2bin conversion

lcdout dec2 reg_val[3]