I'm having a trouble on how can I convert my filename into date time format. The format of my filename is varchar and The problem is the last part of the name file is not formatted as a date it should be formatted in hour, minutes and AM/PM see my sample image below. do you have any idea of this ? change from 33250400 to 01-47 PM. It would be great if anybody could figure out, thank you so much in advance!.
Expected output
2021-03-30-01-47 PM.csv
What I've tried
->select(['table.*',DB::raw(' DATE_FORMAT(table.file_name, "%Y-%m-%d-%h:%i %p") AS final_date')