select schema_name(t.schema_id) + '.' + t.name as [table], c.column_id, c.name as column_name, type_name(user_type_id) as data_type, scale as second_scale from sys.columns c join sys.tables t on t.object_id = c.object_id where type_name(user_type_id) in ('date', 'datetimeoffset', 'datetime2', 'smalldatetime', 'datetime', 'time') order by [table], c.column_id;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter