I have 2 timestamps with different format:
1/2/2021 21:15
19-3-2021 21:15
Is there a method in javascript to get just the date for these timestamps?
Expected output:
'1/2/2021'
'19/3/2021'
I know using substr() is not effective as the length of the date string can vary.