format ids and dates