How are you displaying the smalldatetime field? A query in Query Analyzer, a web page etc.?
Datetime columns are stored in SQL Server as the number of seconds since a certain date. To format the display of datetime columns, use the CONVERT function with the style parameter to format the result as character data, e.g.
SELECT Convert(varchar(20), MyDateTimeColumn, 103)
to display the date in British dd/mm/yy format,
SELECT Convert(varchar(20), MyDateTimeColumn)
to display the default format, mon dd yyyy hh:miAM/PM
and so on.
Hope that helps,
Nathan
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
----------------------------------------
Want to get a good response to your question? Read this FAQ! -> faq183-874
----------------------------------------