I want to convert some date fields into format defined by user. Those date formats are saved in database table. Below is the detailed explanation.
My application is having multiple projects, at the time of creating a project user specifies date format eg: 'd-m-Y', 'm-d-Y', 'Y-m-d' this date format gets saved into database. Now at the time of fetching any details regarding the project I want every date fields to be converted into the format specified by the user. Is there anyway to do this without using loops or custom queries?
@snapey Yes you are right, And I too thought of the same. But then I have to make changes on many places and suppose I require Android/iOS app in future I have to make changes twice. Why it is not a good idea to format the dates in API itself? I want to do this in Lumen.