In my scenario, I need to convert timestamp
value to specific time format in react native. I tired below code but can't able to achieve exact formate output. How to achieve it?
var dateTime = new Date(23456789 * 1000); this.setState({DateTime:('0'+ dateTime.getUTCDate()).slice(-2) +'/'+ ('0'+ dateTime.getUTCMonth()).slice(-2) +'/'+ dateTime.getUTCFullYear() +''+ ('0'+ dateTime.getUTCHours()).slice(-2) });
Exact output expecting : Wed, 2/01/2000 - 1.10 AM