import { format } from "date-fns"; export const fixTime = (date: any) => { const strippedDate = date.replace("Z", ""); // Remove Z return format(strippedDate, "MM/dd/yyyy hh:mm a"); };