![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| With Member [Measures].[Today] as |
#3
| |||
| |||
|
|
Hi Andrés, You're right, the Date() function doesn't work for me in AS 2005 Adventure Works - but Now() still seems to work. So could you use something like: With Member [Measures].[Today] as Format(Now(), "d") select {[Measures].[Today]} on 0 from [Adventure Works] --------------------------------- Today 4/25/2006 - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
| With Member [Measures].[Today] as |
#5
| |||
| |||
|
|
Andrés, I checked the list of VBA functions exported by the VBAMDX assembly (this is outlined on page 363 of the Applied MSAS 2005 book by Teo Lachev), and Date() is still there. So the problem is probably due to a collision with the reserved usage of Date elsewhere - this also happened with Log(). Enclosing "Date" in square brackets resolves this issue: With Member [Measures].[Today] as CStr(VBA![Date]()) select {[Measures].[Today]} on 0 from [Adventure Works] --------------------------------- Today 4/25/2006 - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |