SQL SERVER – Update a DateTime field

This is an example on how to update a Datetime field including Hour, minutes and seconds

update [dbo].[Quote]
set   modifiedOn = CONVERT(datetime,'2021-11-11T10:22:59.000',126)
where quoteid in (80635, 80609)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s