Undocumented Date Functions

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

Undocumented Date Functions

Post by gtonkin » Tue Oct 26, 2021 7:11 am

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 » Tue Oct 26, 2021 3:04 pm

nice findings... Thanks George!
There is no OLAP database besides TM1!

Mark RMBC
Community Contributor
Posts: 267
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 » Wed Oct 27, 2021 7:34 am

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: 2232
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: 10.2.2., PAW
Excel Version: Nearly all of them

Re: Undocumented Date Functions

Post by Steve Rowe » Wed Oct 27, 2021 12:23 pm

Astounding! Good work George
Technical Director
www.infocat.co.uk

Wim Gielis
MVP
Posts: 2786
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.10
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Undocumented Date Functions

Post by Wim Gielis » Thu Oct 28, 2021 6:04 pm

Mark RMBC wrote:
Wed Oct 27, 2021 7:34 am
Anyway 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

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 120 TM1 articles and a lot of custom code
Newest blog article: Documenting processes and rules https://github.com/wimgielis

Mark RMBC
Community Contributor
Posts: 267
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 » Fri Oct 29, 2021 7:25 am

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

viewtopic.php?t=13317

Post Reply