I have a temp data frame which has dates as below. I am trying to sort it with dates, but output is not coming correctly. For example, 20-May-2021 is coming at No4 in place of at top
temp%>%arrange(EXPIRY_DT=as.Date(EXPIRY_DT,"%dd/%mmm/%YYYY"))
EXPIRY_DT
1 27-May-2021
2 24-Jun-2021
3 29-Jul-2021
4 20-May-2021
5 03-Jun-2021
6 10-Jun-2021
7 17-Jun-2021
8 01-Jul-2021
9 08-Jul-2021
10 15-Jul-2021
11 30-Sep-2021
12 30-Dec-2021
13 31-Mar-2022
14 30-Jun-2022
15 29-Dec-2022
16 29-Jun-2023
17 28-Dec-2023
18 27-Jun-2024
19 26-Dec-2024
20 26-Jun-2025
21 24-Dec-2025