0
I needed to migrate the database of an application made in vba using access. The database was native to access and passed to SQL Server.
In access, as everything is native everything worked perfectly, but in migration a problem that is giving me a lot of headache is the conversion of dates.
Access displays and saves records in dd/mm/yyyy format
25/06/1987
SQL Server however has the format yyyy-mm-dd hh:MM:ss
1987-06-25 00:00:00
With some changes of default date format configuration (in SQL Server) I was successful only in inserting data. However I could not in any way in the queries return the date in the format dd/mm/yyyy.
I am currently having to prepare the application always before inserting, formatting the dates to the SQL Server format, as well as in the queries also formatting the date back to the Access format.
In addition to not being a "beautiful" solution I could not remedy all the bugs that this causes in the system. Sometimes I don’t have absolute control of what access wants to save or return from the bank and the dates in the fields are in the wrong format.
Anyway. The question is:
Is there any way to configure SQL Server dates to receive and return data in dd/mm/yyyy format?
Or else there is some solution to this in access itself that saves me the trouble of handling all queries?
https://social.technet.microsoft.com/Forums/pt-BR/5202d93b-eacb-4dfd-bd76-0c069b47f254/mudar-formato-data-para-pt?forum=infrageral
– Marco Souza
https://adrianobrandaodba.wordpress.com/2013/08/24/alterar-o-formato-de-data-do-sql-server/
– Marco Souza
I believe that if you only search for the date without the time the Access will already read as it needs. Do a test there.
– Evert