I have a situation where I need to display an object's 'birthDate' property in the format DD/MM/YYYY on screen. The data is stored in the database as YYYY-MM-DD, which is a string type. I am currently using bootstrap bsDatePicker for this task. In order to submit any modifications, I need to convert the displayed date to match the database format.
Could you provide guidance on how to serialize the Date (DD/MM/YYYY) to the format YYYY-MM-DD when making a JSON request?
Are there any clever techniques to optimize this conversion without altering the database structure?
Thank you for your assistance!