I am trying to get the month part from a date which I get by using a max fuction.
My date comes from a select statement which goes like this:
select max(Invoice Date)
This returns me the latest date .(Ex:8/31/2004)
From this date I need to get the month number.
So my query should return 8.
Do I need a sub query for this.Please help as I am a novice to SQL Server.