Format timestamp.