1

I wonder if there is some type of common method that would help me write query with date/time field in it. For example: I am developing a very small project utilizing MySQL database. However, my client is considering switching to his existing SQL server.

Example (datetime column):

SELECT DATE_FORMAT(contract_date, '%d.%m.%Y') FROM `employees` 

Question: Can query below become usable in SQL in case I replace database driver (currently) mysqli to sqlsrv?

I understand I can use some type of config variable for date format... Would it be the best way? Is there something that Codeigniter 3 has in place?

  • feel free to use your own query sample
Dharman
  • 30,962
  • 25
  • 85
  • 135
virrion
  • 416
  • 1
  • 5
  • 18

0 Answers0