Page 1 of 1

Possible bug with Today and Day TI functions

Posted: Fri Jul 17, 2009 10:16 am
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

Re: Possible bug with Today and Day TI functions

Posted: Fri Jul 17, 2009 10:28 am
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.

Re: Possible bug with Today and Day TI functions

Posted: Fri Jul 17, 2009 10:31 am
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....

Re: Possible bug with Today and Day TI functions

Posted: Fri Jul 17, 2009 10:42 am
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!}

Re: Possible bug with Today and Day TI functions

Posted: Fri Jul 17, 2009 10:45 am
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: