Transact-SQL: update di un campo DATETIME

Viene utilizzata la funzione CONVERT:

UPDATE NICOLA
SET DATA_NASCITA = CONVERT(datetime, '25/04/1972 10:36')
WHERE USER = 'NICOLA'

Maggiori dettagli sulla funzione CONVERT sono qui: http://msdn.microsoft.com/it-it/library/ms187928.aspx

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>