?
Solved

SQL Question

Posted on 2009-02-10
1
Medium Priority
?
216 Views
Last Modified: 2012-05-06
I found this in a query and wanted to know exactly what this was pulling out ....

First they declared it ...

DECLARE @DXDate DATETIME

then

SET @DXDate = '06/30/' + CONVERT(VARCHAR , YEAR('12/31/2008'))

What exactly is this pulling out for me? The 2008?
0
Comment
Question by:Jeff S
1 Comment
 
LVL 22

Accepted Solution

by:
pivar earned 1000 total points
ID: 23605971
Hi,

Yes, the YEAR function returns the year of the supplied date.


/peter
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question