all groups > sql server programming > august 2003 >
You're in the

sql server programming

group:

Updating smalldatetime field with current date and time?


Updating smalldatetime field with current date and time? Robert Johnson
8/27/2003 11:49:27 PM
sql server programming:
How can I update a smalldatetime field with the current date and time? I
have tried many different ways using the Convert function, but I just can't
seem to figure it out. I've been working on this problem most of the
evening. I would really appreciate any help you can give me.

Thanks in advance,

Robert



Re: Updating smalldatetime field with current date and time? Jens Süßmeyer
8/28/2003 7:27:25 AM
Please do not post seperately in every newsgroup !!!



Re: Updating smalldatetime field with current date and time? Uri Dimant
8/28/2003 8:21:21 AM
Robert
Look at this one works for you.
CREATE TABLE TABLE1
(
COL SMALLDATETIME NOT NULL
)
INSERT TABLE1 VALUES ('20030828')

SELECT COL FROM TABLE1
UPDATE TABLE1 SET COL= GETDATE()

DROP TABLE TABLE1


[quoted text, click to view]

Re: Updating smalldatetime field with current date and time? Uri Dimant
8/28/2003 8:48:24 AM
It happend by mistake.

[quoted text, click to view]

AddThis Social Bookmark Button