I am using MongoDB to store data, and on retrieving them I want to get the date and convert it to something that looks like this:
'2022-07-20T10:12:21.054Z'
right now my date looks like this:
"Nov. 13, 2022 at 5:51 AM "
because I am getting it directly from mongo through the createdAt key. How can I achieve this?