Unanswered: Losing leading zeros when casting numeric
I am casting a date to character in order to substring some of the components (mm, dd, etc). How do I NOT lose the leading zeros when it casts to character? I've had to put in case statements to substring correctly depending on what the date is (if it's less than 10, it drops that leading 0 and becomes 30703 instead of 030703). Is there anything I can do other than using the case statements to get around this issue? I have the same problem with times.