Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How to return only year from datatime in a SelectCommand

$
0
0

Hi guys,

I tried this query in my SelectCommand:

SelectCommand="SELECT DISTINCT YEAR(RECEIPT_START_DATE) FROM [LOADING_TABLE] WHERE [RECEIPT_START_DATE] IS NOT NULL"

But, for some reason, there is an error with the YEAR() function. Is there any other way to do this?

Thanks in advance!


Viewing all articles
Browse latest Browse all 23244

Trending Articles



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