This week, we look at the
DATETIME2data type. I’m not the first person to think that this was probably not the best name for a data type, but here we are, a decade later.
DATETIME2is, at its heart, a combination of the
TIMEdata types we covered in previous weeks.
DATEis 3 bytes long and
TIMEis between 3 and 5 bytes long depending on accuracy. This of course means that
DATETIME2can be anything from 6 to 8 bytes in length.
Nowadays, if you want to store a date plus time, this should be your default, not