January 23, 2007 at 3:16 pm
lets say i have a column which is simply: datetime, and i want to
run getdate()
would the getdate() return ONLY the most recent value? like in the
following records.
this being most recent: (2007-01-23 13:22:03.350) ??
2007-01-23 13:22:03.350
2007-01-23 10:17:34.723
2007-01-23 09:50:29.673
2007-01-23 09:49:14.613
2007-01-23 09:18:40.043
2007-01-23 04:01:13.353
just need to be absolutely sure here, and figure i
would as some others in the sql community.
i can run test after test, but how do i know it
will be consistent 100% of the time? doesn't hurt
to ask.
thanks in advance.
_________________________
January 23, 2007 at 4:17 pm
getdate() returns current date and time like the clock.
Regards,Yelena Varsha
January 23, 2007 at 4:18 pm
GETDATE() is a system function for returning the system's current date/time. If you want to get the most recent date from a column use MAX()... example:
SELECT Max(MyDateTimeColumn) FROM MyTable
SELECT GETDATE() will always return the current date/time.
January 24, 2007 at 8:06 am
wow... many thanks!
thats just the information i needed!
you guys rock!
_________________________
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply