Manage Learn to apply best practices and optimize your operations.

Year and quarter -- the Formula language way

How to show when a doc was created in the format Year, Qx -- using formula.

This tip is useful for reporting purposes. It shows when a document has been created in the format 2003 Q1, 2003 Q2, etc. It uses the New Zealand tax year as its base calculation, which begins in April. Therefore, any document created in months 1, 2 or 3 will show as Q4 for the previous year.
Create a field computed when you compose a text field called QuarterOpened and use this code:

mtmp:=@Month(@Now);
ytmp:=@If(mtmp < 4; 
(@Year(@Now)-1);@Year(@Now));
@If(mtmp < 4; @Text(ytmp) + " 
Q4";@If(mtmp < 7; @Text(ytmp) + " 
Q1";@If(mtmp < 10; @Text(ytmp) + 
" Q2";@If(mtmp < 13; @Text(ytmp) + " 
Q3";""))))

Do you have comments on this tip? Let us know.

Dig Deeper on Lotus Notes Domino Formula Language

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close