Specifying todays date in Subscription Parameters
I have designed a report with date parameters, and I am looking to send a subscription that contains information for those parameters, so i can do a daily report.
I have been informed that it is VB that fills the box.
How can i return todays date for Midnight last night and midnight tonight ?
Also, how about the code to get Sunday midnight, if the report is run at 5:00pm Friday.
I am a complete VB n00b and i apologise.
It also needs to be in UK format if at all possible.
MJW
[515 byte] By [
mjwigham] at [2007-12-16]
Use the Today() function to return todays' date (midnight). You can use the DateAdd() function to add or subtract days. If you make a parameter default to today's date, you can subscribe to a report and simply tell it to use the default value.
This will work for UK. The date values have nothing to do with locale (they are processed in UTC), just the formatting of dates.