Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Extracting YEAR from a DT_DBTIMESTAMP column

$
0
0

Hi All,

I have a DT_DBTIMESTAMP column and I would like to extract only the YEAR part of it in a derived column expression. I tried the following expressions. But always the day and month also coming up in the output. Please let me know your thoughts.

1. (DT_DBTIMESTAMP)YEAR(DOB)

2. (DT_DBTIMESTAMP)(DT_DBDATE)YEAR(DOB)

3. YEAR((DT_DBTIMESTAMP)DOB)

4. YEAR((DT_DBDATE)DOB)

Thanks,

Akhil


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>