Timst bug

Post Reply
stex2727
Posts: 66
Joined: Tue Sep 15, 2009 11:29 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2007

Timst bug

Post by stex2727 »

Is this a bug?

On the code below run on 10.1.1 anything less than one minute adds a minute to the formatted output. That is, for 18 seconds below I get 00:01:18

Code: Select all

rough18Sec = (18/86400);
asciioutput('_test.txt', TIMST(rough18Sec, '\h:\m:\s', 0));
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Timst bug

Post by rmackenzie »

stex2727 wrote:Is this a bug?
No - \m is month. You should use \i for seconds. You are getting 01 for the month because it is defaulting to 1960-01-01. Try it like this:

Code: Select all

rough18Sec = (18 / 86400);
asciioutput ( '_test.txt', TIMST ( rough18Sec, '\Y\m\d\h\i\s' ) );
Robin Mackenzie
stex2727
Posts: 66
Joined: Tue Sep 15, 2009 11:29 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2007

Re: Timst bug

Post by stex2727 »

ta,

I'd like to think that's the last time I make that mistake, but I suspect not
Post Reply