Last day of Month

  • Hello All,

    I want to disply last day of the month in SSRS .

    I have year and Month parameter as well as Field aslo.

    How can i display last day of month?

    If monht is 1 then out put is 31st January.

    Reply me.

    Thanks

    Bhavesh

  • Here is a series of T-SQL statements for getting various dates, you will probably find what you want here

    http://qa.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/

    Also suggest you add these to your "Sandbox" DB for future use.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • bhaveshp.dba (12/23/2011)


    Hello All,

    I want to disply last day of the month in SSRS .

    I have year and Month parameter as well as Field aslo.

    How can i display last day of month?

    If monht is 1 then out put is 31st January.

    Reply me.

    Thanks

    Bhavesh

    You have two separate parameters? Or are both of those values being pulled from a single date datatype parameter in SSRS?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Try out the following :

    =DateSerial(Year(Now), Month(Now)+1, 0) - last day of the month.

  • yes, I have two seperate parameter . And Also i used Group by Month.

    SO i want a Ouput based on Month end for each month.

    Like 31 of jan

    28 feb

    31th march....

    ...

    ...

    31st dec.

  • This is woriking for last of the month.

    but if I want a output based on group by month ...then how can i get each month ???

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply