Forked from ReidCarlberg/Date - This week, Next 90 Days, Past or Future
Created
February 7, 2014 21:37
-
-
Save noeticpenguin/8872396 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
and ( | |
YEAR(Date_Start__c) == YEAR(TODAY()), | |
IF( | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) > 52, | |
52, | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) | |
) == | |
IF( | |
CEILING( ( TODAY() - DATE( YEAR( TODAY() ), 1, 1) + 1) / 7) > 52, | |
52, | |
CEILING( ( TODAY() - DATE( YEAR( TODAY() ), 1, 1) + 1) / 7) | |
) | |
), | |
"1. This Week", | |
IF (Date_Start__c < TODAY(), | |
"0. Past", | |
if ( | |
Date_Start__c - TODAY() < 91, | |
"2. Next 90 Days", | |
"3. Future" | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment