Groups | Blog | Home
all groups > sql server new users > september 2006 >

sql server new users : DateTime format conversion problem


Andrew J. Kelly
9/27/2006 10:21:24 PM
Have a look at these for details on how datetimes are stored and handled.


http://www.karaszi.com/SQLServer/info_datetime.asp
Guide to Datetimes
http://www.sqlservercentral.com/columnists/bsyverson/sqldatetime.asp
Datetimes
http://www.murach.com/books/sqls/article.htm
Datetime Searching

--
Andrew J. Kelly SQL MVP

[quoted text, click to view]

herethere NO[at]SPAM newsgroup.nospam
9/28/2006 12:32:41 AM
This one is going to be so easy once I get an answer.

When I do a select on a table with a DateTime field I get an answer of
"2006-09-27 16:23:24.000". When I SELECT that into a variable with a DateTime
format I get "Sep 27 2006 4:23PM'.

What I want is to get select format in a variable. I do not care if it is a
string.

My ultimate goal is to select the MAX date from a table then add one second
AddThis Social Bookmark Button