Monday, 31 October 2011

Fetch records from current years first date to current date in sql server

Select dateofPurchase from purchase_tbl where dateofPurchase
Between convert(datetime,convert(nvarchar,datepart(year,GetDate()))+'-1-1') and GetDate()


Tag: Between, Between two dates, Current Year, First Day, Last Day, Sql server

No comments:

Post a Comment

Parsing JSON w/ @ symbol in it

To read the json response like bellow @ concatenated with attribute                             '{ "@id": 1001, "@name&q...