Skip to main content
1 of 2
LowlyDBA - John M
  • 11k
  • 11
  • 45
  • 62

No, there isn't a way to automatically change a dateime 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