Skip to main content
2 of 2
added 1 character in body
RLF
  • 14k
  • 2
  • 34
  • 47

No, there isn't a way to automatically change a datetime field to a datetime2 field if the former is specified in a table creation.

To do it manually:

ALTER TABLE [table] MODIFY COLUMN [column] DATETIME2;

If the issue pertains to end users, education is your best bet to make the creation of tables more uniform and compliant with using datetime2.

LowlyDBA - John M
  • 11k
  • 11
  • 45
  • 62