Tuesday, July 19, 2011

Last Day of the Month SSRS Expression....

A question came on one of the fourms about how to get the last day of the month using months as intgers, the person has 1,2,3....etc in his column and need to convert that to month and get the display only the last day of the month in the MM/DD/YYYY format....

Use that for January (1)
=Left(DateSerial(Year(Now()), 1, "1").AddMonths(1).AddDays(-1) , 10)
Use that for February (2)
 
=Left(DateSerial(Year(Now()), 2, "1").AddMonths(1).AddDays(-1) , 10)
 

Hope that helps...

2 comments:

  1. Dear Jason,

    your blog really sounds good,
    continue your good job :)

    Best Regards,
    Reza

    ReplyDelete
    Replies
    1. Thanks Reza, I'm really honored by your blog visit...sorry for the late reply..

      Delete