Using DatePart

Using DatePart

 

  

i have a date field in table1
table 1 dtfield
2000-01-03 00:000:0000
displaying date and time

i want following values in table2
dtmonth: just display the month
dtyear: just display the year
dtdate etc..
i want to update table2 and bring the dtfield from table1 to table2 but just put month, year, date in individual columns
how does that work??


---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger

MS Sql Server LazyDBA home page