I searched in the OSI site, but can't find a quick answer. I can create Year('*') variable, but can't figure out a way of showing it as 2 digit. I tried format function, but none of my attempts work.
You can also use the formula below, which is shorter than Sebastien Raposo's formula and avoids conversion to a string.
Year('*') Mod 100
This formula works regardless of what timestamp you use in place of '*'.
If you plan on replacing '*' with some time in the year 2010 or later, you could even use this:
Year('*') - 2000
If you wanted the answer to be a string, just wrap the formulas with the String function:
String(Year('*') Mod 100)
String(Year('*') - 2000)
These are still shorter (in terms of character count) and easier to read than Sebastien's answer (no offense!):
This should work:
If you need to work with the 2 digit year as a number just cast it as an int using the Int() function!
Thanks. Was too focus on the format function.
That will work.
Please mark either my answer or Sebastien's answer as correct so that this question shows up as being answered, which informs others that no further participation is needed.
Retrieving data ...