I'm passing TextBox DateTime value to Entity Model in api and formatting datetime into CultureInfo("en-GB", true) while saving data into database.
It is showing day as a month and month as a date.
Here is my code:
IFormatProvider FormatDate = new System.Globalization.CultureInfo("en-GB", true);
Convert.ToDateTime(user.DOB, FormatDate);
I'm passing date "08-04-2019" which is dd-MM-yyyy format, into user.DOB through api.
user.DOB showing Day = 4 and Month = 8 you can check it in the below image...