Thursday 19 September 2013

Disply previous 3month names


Hi All,

This is Commen requirement, need to disply all last 3months name.

Find bellow steps :

1.Here current month is September, select DATE,Month Names Column.
2. Add Filter convert on SQL on DATE Column
Use bellow query on filter Tab

Time.Date <= cast(current_date as date) and Time.Date >= TIMESTAMPADD(SQL_TSI_MONTH, -2, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

Here Time.Date is my Dimession Column

3.save and see result.

Finaly Result like this

No comments:

Post a Comment