Jump to content

How to best obtain the current two digit year?


 Share

Recommended Posts

Hi all. The `@year` macros inserts the current four digit year.  But is there a macro (or alternative) to insert the two digit year? 

If not, how would I best obtain the two digit year?  If I first obtain the four digit year as a number, is there a function I can use to strip off the first two digits?

Link to comment
Share on other sites

  • Moderators

Still in one line:

ConsoleWrite(StringRight(@YEAR, 2) & @CRLF)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

41 minutes ago, AspirinJunkie said:

cag8f will be very sad in the year 2100-2109 because his script will output only one-digit year numbers... 😄

At least he should have received his first CoVID-19 vaccination by then (if he is lucky) :D.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

38 minutes ago, Nine said:

CoVID-19 - What is that ? A new programming language ?

No, this is the long time and desperately awaited compiler for AutoIt :D.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...