Page 1 of 1

Subtract/Add Hours from Serial Date

Posted: Fri Apr 20, 2012 1:20 am
by PlanningDev
I have a process to wildcard file search the logs directory looking for the latest log for a process for the current day. The problem here is that the log files are being logged with a date/timestamp of GMT and the Now() function is working off of server time. The issue being that when I get near the end of the day such as right now, the day appears to be tommorrow in terms of the log file name but yet the Now() function still believes its today.

I searched the post about Times/Dates in TM1 but Im not quite sure if there is a way to manipulate the serial date for now to include the -7 for PST?

Thanks

Re: Subtract/Add Hours from Serial Date

Posted: Fri Apr 20, 2012 1:23 am
by Martin Ryan
From that post
Alan Kirk wrote: TM1 Times
TM1 times work in the same way as Excel's; just as integers represent whole days, decimal remainders represent times. 0.25 will represent 6am, 0.5 represents noon, 0.75 represents 6pm and so on.
So you should just be able to subtract seven divided by 12 from the current TM1 serial time to get UST.

Martin

Re: Subtract/Add Hours from Serial Date

Posted: Fri Apr 20, 2012 12:51 pm
by lotsaram
Martin Ryan wrote:So you should just be able to subtract seven divided by 12 from the current TM1 serial time to get UST.
Although How Maui slowed the Sun is a favorite bedtime story at my home Tama-nui-te-rā must move exceptionally fast in your little corner of Aotearoa.

I would be more inclined to divide by 24 and then subtract to get to GMT!