1. Date acceptance patterns (under OptionsLanguage SettingsLanguages): this setting allows program to understand which strings must be treated as dates, and parts of those strings mean what. I.e., an acceptance string like M/D/Y allows program to see that a string having three numeric parts separated by forward slashes is an accepted date, and in that date, month is the first part, then goes day, and then year. So it converts the entered matching string to a date with those parts (which is internally a number), and write the resulting number to a cell's value.
2. Cell format's Format code: it tells the program how to display cell's value. So in case of a format code like DD/MM/YYYY, Calc would know that a number in this cell must be shown as date, and the day of the date must be shown first, then month, then year.