thayduck
asked on
SSRS 2005 Show Today and Last Day of previous month in report
I want to show todays date and the last day date of the previous month in a report text box.
should look like this:
2010/09/24, 2010/08/31
How would you do ?
should look like this:
2010/09/24, 2010/08/31
How would you do ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Current Date
=Globals!ExecutionTime Last Day of Previous Month
=DATEADD("d",-(DATEPART("d ",Globals! ExecutionT ime)), Globals!ExecutionTime)
Then in the properties, set the Format to .... yyyy/M/d
=Globals!ExecutionTime Last Day of Previous Month
=DATEADD("d",-(DATEPART("d
Then in the properties, set the Format to .... yyyy/M/d
ASKER
m/e date is showing like this:
8/31/2010 1:14:43 PM
need to be 2010/08/31
8/31/2010 1:14:43 PM
need to be 2010/08/31
that's what the last line was for ...
Then in the properties, set the Format to .... yyyy/M/d
Then in the properties, set the Format to .... yyyy/M/d
You can set it in the GUI part like this. Right click on the textbox, select TextBox Properties. Then select Number on the left hand side, select Custom on the list, and in custom properties, type in yyyy/MM/dd
DateCustomProperties.JPG
DateCustomProperties.JPG
ASKER
Still having same issue
m/e date is showing like this:
8/31/2010 1:14:43 PM
need to be 2010/08/31
ssrsformat-.doc
m/e date is showing like this:
8/31/2010 1:14:43 PM
need to be 2010/08/31
ssrsformat-.doc
You need to break this into 3 fields to be able to apply the formatting at the report level. It will only apply the date format if all the data in the field is a date. You currently have 2 dates and a comma as one long string.
Actually ... you can convert it in the same textbox, but I was mistaken when I thought you had two different textbox's you were putting them into ... just apply the FORMAT command like below:
=FORMAT(Globals!ExecutionT ime,"yyyy/ MM/dd")
=FORMAT(DATEADD("d",-(DATE PART("d",G lobals!Exe cutionTime )), Globals!ExecutionTime),"yy yy/MM/dd")
=FORMAT(Globals!ExecutionT
=FORMAT(DATEADD("d",-(DATE
ASKER
aelliso3:
I have decided to use your first suggestion which works perfectly.
Thanks....
I have decided to use your first suggestion which works perfectly.
Thanks....
ASKER
aelliso3:
Did not realize you sent another solution. Your last solutio you sent works perfectly to, so I WILL use that one.
Again, Thank You.....
Did not realize you sent another solution. Your last solutio you sent works perfectly to, so I WILL use that one.
Again, Thank You.....
The last one is probably the cleanest way ... glad it worked out ... thx
ASKER
Can that be done ?