Undocumented Date Functions

Ideas and tips for enhancing your TM1 application
Post Reply
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Undocumented Date Functions

Post by gtonkin »

Found some useful functions after a bit of sleuthing:

Sample TI process:

Code: Select all

sYear=YRS(TODAY);
sMonth=MOS(TODAY);
sDay=DYS(TODAY);
asciioutput('debug.txt',sYear, sMonth, sDay);
Gives you:
"2021","OCT","26"

The return of the 3 character month is the kicker for me!
Works in TI and Rules. All three functions return string values.
Looks like they have been available since 8.4.2 and work in PA 2.0.9.9.
User avatar
scrumthing
Posts: 81
Joined: Tue Jan 26, 2016 4:18 pm
OLAP Product: TM1
Version: 11.x
Excel Version: MS365

Re: Undocumented Date Functions

Post by scrumthing »

nice findings... Thanks George!
There is no OLAP database besides TM1!
Mark RMBC
Community Contributor
Posts: 292
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Re: Undocumented Date Functions

Post by Mark RMBC »

Am I the only one slightly gobsmacked by this?

Anyway George, we will start calling you Sherlock.

regards,

Mark
User avatar
Steve Rowe
Site Admin
Posts: 2410
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: Undocumented Date Functions

Post by Steve Rowe »

Astounding! Good work George
Technical Director
www.infocat.co.uk
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Undocumented Date Functions

Post by Wim Gielis »

Mark RMBC wrote: Wed Oct 27, 2021 7:34 amAnyway George, we will start calling you Sherlock.
I have a successor :lol:
viewtopic.php?f=3&t=14417&p=71271

I was called Van der Valk in that topic :)

Well done George
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Mark RMBC
Community Contributor
Posts: 292
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Re: Undocumented Date Functions

Post by Mark RMBC »

Wim - I always thought you deserved that title after you figured this out:

viewtopic.php?t=13317
Post Reply