Click here to Skip to main content
16,021,294 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi,


i have a table with a column of date , i want to compare it with

present financial year
Posted
Updated 26-Jul-12 3:13am
v2

1 solution

Every country has their own financial year. Depending on what you want, you can use CONVERT & GETDATE to get the month and year of current year. Based on which you will get to compare the current date with a financial year.

Reference:
MSDN: CAST and CONVERT (Transact-SQL)[^]
SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900