dateformat and expiration functionality