Skip to content

Dejar la hora de una fecha a ZERO

January 17, 2013

UPDATE TABLA SET Fecha = dateadd(dd, datediff(dd,0, Fecha), 0)

Con esta instrucción actualizamos el campo Fecha de todos los registros, que antes estaban en formato 13/02/2012 08:25:00 000  —> ahora 13/02/2012 00:00:00 000

Leave a Comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: