Last Quater
How do i write an expression setting the default value in a start Date parameter for the start of last quarter and end of the quarter as default value in the end date parameter ? I am using BID 2008 Lummzy
August 9th, 2012 6:46am

You can create a dataset to return those values and then use that dataset to provide the defaults for the the parameters. For the query, this should be retreived from a date table, especially if you are talking about fiscal periods.
Free Windows Admin Tool Kit Click here and download it now
August 9th, 2012 7:01am

Hi Lumzzy, Sorry for the delay. To get the first day of the last quarter, you can use the following expression: =DateAdd("q", DateDiff("q","1/1/1900",Today())-1,"1/1/1900") To get the last day of the last quarter, please use the following expression: =DateAdd("d",-1,DateAdd("q", DateDiff("q","1/1/1900",Today()),"1/1/1900")) If you have any questions, please feel free to let me know. Regards, Mike YinMike Yin TechNet Community Support
August 16th, 2012 2:42am

Hi Lumzzy, Sorry for the delay. To get the first day of the last quarter, you can use the following expression: =DateAdd("q", DateDiff("q","1/1/1900",Today())-1,"1/1/1900") To get the last day of the last quarter, please use the following expression: =DateAdd("d",-1,DateAdd("q", DateDiff("q","1/1/1900",Today()),"1/1/1900")) If you have any questions, please feel free to let me know. Regards, Mike YinMike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2012 2:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics