Possible bug with Today and Day TI functions

Post Reply
User avatar
Steve Rowe
Site Admin
Posts: 2455
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Possible bug with Today and Day TI functions

Post by Steve Rowe »

Trying to get a TI to run on a specific day every month and I'm getting some strange behaviour

It seems that DayNo gives tomorrow not today
asciioutput( 'temp.cma' , Today, Str(DayNo(Today),2,0) );

Contents of temp.cma
"09-07-17","18"

That has to be a bug? Or is this some kind of feature?? All the code has to do is right(date,2) not too much to ask is it??
vers 9.0.3 U9
Technical Director
www.infocat.co.uk
Alan Kirk
Site Admin
Posts: 6645
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Possible bug with Today and Day TI functions

Post by Alan Kirk »

Steve Rowe wrote:Trying to get a TI to run on a specific day every month and I'm getting some strange behaviour

It seems that DayNo gives tomorrow not today
asciioutput( 'temp.cma' , Today, Str(DayNo(Today),2,0) );

Contents of temp.cma
"09-07-17","18"

That has to be a bug? Or is this some kind of feature?? All the code has to do is right(date,2) not too much to ask is it??
vers 9.0.3 U9
Uh, Butch? Y'sure it's "DayNo" (which returns the serial number) that you want there and not "Date" (which returns the date string)?

(I know, it's Friday and it's been a long week... :D )

Regards, Sundance.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Alan Kirk
Site Admin
Posts: 6645
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Possible bug with Today and Day TI functions

Post by Alan Kirk »

Alan Kirk wrote:
Steve Rowe wrote:Trying to get a TI to run on a specific day every month and I'm getting some strange behaviour

It seems that DayNo gives tomorrow not today
asciioutput( 'temp.cma' , Today, Str(DayNo(Today),2,0) );

Contents of temp.cma
"09-07-17","18"

That has to be a bug? Or is this some kind of feature?? All the code has to do is right(date,2) not too much to ask is it??
vers 9.0.3 U9
Uh, Butch? Y'sure it's "DayNo" (which returns the serial number) that you want there and not "Date" (which returns the date string)?

(I know, it's Friday and it's been a long week... :D )

Regards, Sundance.
Actually for me as well; I think that since you're already getting the date string from Today(), you may as well just use SubSt to parse it. Raising the bridge rather than lowering the river and all....
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
Steve Rowe
Site Admin
Posts: 2455
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Possible bug with Today and Day TI functions

Post by Steve Rowe »

Doh, yes it's me...
Already switched to subst.
asciioutput( 'temp.cma' , Today, Str(Day(Today),2,0) );

Is what I was after.

It's just one of those horrid conincidences that the serial number for 17/07/2009 happens to end with 18 that led me up the garden path.
{Evil thought : Might report it to IBM support and see how long it takes them to fix!}
Technical Director
www.infocat.co.uk
Alan Kirk
Site Admin
Posts: 6645
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Possible bug with Today and Day TI functions

Post by Alan Kirk »

Steve Rowe wrote:Doh, yes it's me...
Already switched to subst.
asciioutput( 'temp.cma' , Today, Str(Day(Today),2,0) );

Is what I was after.

It's just one of those horrid conincidences that the serial number for 17/07/2009 happens to end with 18 that led me up the garden path.
{Evil thought : Might report it to IBM support and see how long it takes them to fix!}
Based on one recent thread, they'll probably tell you to move the code to the Data tab and see whether that works... :twisted:
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply