get timestamp and show specified format from timestamp