Formatting Date

Below code is primarily used prior to comparing two dates. Especially when one date is retrieved...