Only Want Last 2 Digits of Year

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ADP_MAN
Junior Coder
Posts: 45
Joined: Wed Apr 07, 2004 2:04 pm

Only Want Last 2 Digits of Year

Post by ADP_MAN » Wed Oct 24, 2018 2:49 pm

Hi All,

If I have the date "2018" what command can I use to just give me the result "18". Apologies in advance if this is an easy one, but I am having trouble figuring it out.

Thanks,
AM

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Only Want Last 2 Digits of Year

Post by Marcus Tettmar » Wed Oct 24, 2018 8:13 pm

//assume we have this
Let>theYear=2018

//then do this ...
MidStr>theYear,3,2,result

//result now contains 18.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ADP_MAN
Junior Coder
Posts: 45
Joined: Wed Apr 07, 2004 2:04 pm

Re: Only Want Last 2 Digits of Year

Post by ADP_MAN » Wed Oct 24, 2018 8:22 pm

This worked - thanks!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts