Zsolt Miskolczi
InvisibleProgrammer

InvisibleProgrammer

SQL Server date times explained

SQL Server date times explained

Zsolt Miskolczi's photo
Zsolt Miskolczi
·Mar 16, 2022·

1 min read


declare @this_datetime datetime = getutcdate()
declare @this_datetime2 datetime2 = getutcdate()
declare @this_smaldatetime smalldatetime = getutcdate()

select @this_datetime, @this_datetime2, @this_smaldatetime

select datalength(@this_datetime), datalength(@this_datetime2), datalength(@this_smaldatetime)

image.png

 
Share this