Mar 30, 2006 #1 mplbm Programmer Feb 9, 2006 24 GB How do you extract the year from a datetime field? Thanks, Mike
Mar 30, 2006 #2 vongrunt Programmer Mar 8, 2004 4,863 HR YEAR(datecolumn) Or DATEPART(yy, datecolumn) ------ [small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small] Upvote 0 Downvote
YEAR(datecolumn) Or DATEPART(yy, datecolumn) ------ [small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]
Mar 30, 2006 Thread starter #3 mplbm Programmer Feb 9, 2006 24 GB Sorry, I meant how do you get the full date i.e. dd/mm/yyyy, removing just the time. How do I do this? Upvote 0 Downvote
Sorry, I meant how do you get the full date i.e. dd/mm/yyyy, removing just the time. How do I do this?
Mar 30, 2006 #4 vongrunt Programmer Mar 8, 2004 4,863 HR faq183-5842, tip #7. ------ [small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small] Upvote 0 Downvote
faq183-5842, tip #7. ------ [small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]