Skip to main content

SQL Server date times explained

Published 1 min readMarkdown
SQL Server date times explained

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

95 views

No comments yet. Be the first to comment.