![Page 1: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/1.jpg)
Leap Years and More
@bethbrains
Beth Breisnes Consultant, Bigger Boat
Consulting
Fearless Date Formulas
![Page 2: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/2.jpg)
Forward-Looking StatementsStatement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
![Page 3: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/3.jpg)
Who cares about dates?
Birthdays Membership dates Expiration dates Program dates Anniversaries
![Page 4: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/4.jpg)
Where we’re headed…
Key Date Functions 3 Key Considerations to avoid Leap Year errors Deep Dive on Two Bulletproof Date Formulas
BOO!
![Page 5: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/5.jpg)
HAPPY BIRTHDAY, ASTRO!
![Page 6: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/6.jpg)
The Date Function Machine
INPUT OUTPUT
![Page 7: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/7.jpg)
The Date Function Machine
Date Number
DAY(Date__c)
![Page 8: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/8.jpg)
The Date Function Machine
Date Number
MONTH(Date__c)
![Page 9: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/9.jpg)
The Date Function Machine
Date Number
YEAR(Date__c)
![Page 10: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/10.jpg)
The Date Function Machine
NOTHING Date
TODAY( )TODAY()
![Page 11: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/11.jpg)
The Date Function Machine
NOTHING DateTime
NOW( )NOW()
![Page 12: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/12.jpg)
The Date Function Machine
3 Numbers Date
DATE(yyyy,mm,dd)
![Page 13: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/13.jpg)
The Date Function Machine
DateTime Date
DATEVALUE(DateTime__c)
![Page 14: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/14.jpg)
The Date Function Machine
Ready for a test drive?
![Page 15: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/15.jpg)
The Date Function Machine
Oct 6, 2016 2016
YEAR(TODAY())
![Page 16: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/16.jpg)
The Date Function Machine
Oct 6, 2016
3:00 PM10
MONTH(DATEVALUE(NOW()))
![Page 17: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/17.jpg)
But isn’t date math easy?
OCT
1 + 5 =
OCT
6
![Page 18: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/18.jpg)
Membership/Contract Expiration Date (add 1year-1day to a date)
OCT
1 +364=
SEPT
30
![Page 19: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/19.jpg)
Membership/Contract Expiration Date (add 1year-1day to a date)
OCT
12015
+364=
SEPT
292016
O HAI!
![Page 20: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/20.jpg)
The Big Trap: Leap Years
When do leap years happen?
You don’t need to know!
![Page 21: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/21.jpg)
The Big Trap: Three Key Considerations
1. INPUTS2. OUTPUTS3. SPANS
![Page 22: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/22.jpg)
Calculate Membership/Contract Expiry Date
IF ( MONTH (Join_Date__c) = 2 && DAY (Join_Date__c) = 29,
Join_Date__c + 365, DATE( YEAR(Join_Date__c) + 1,
MONTH(Join_Date__c), DAY (Join_Date__c))
-1 )
(add 1year-1day to a date)
Modified from Celeste Keller, Salesforce Saint
![Page 23: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/23.jpg)
Calculate Birthday This Year… maybe…
DATE(YEAR(TODAY()), MONTH(Birthdate), DAY(Birthdate))
(SPOILER ALERT: THIS IS A HORRIBLE FORMULA. DON’T USE THIS.)
Find the month/dayPut it in this year
WARNING!1. What if their birthday has
already passed this year?2. What if they were born on
a leap day?
![Page 24: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/24.jpg)
Calculate Next Birthday
IF ( MONTH (Birthdate) = 2 && DAY (Birthdate) = 29,
IF ( TODAY() < DATE ( YEAR ( TODAY() ), 1, 1 ) + 59,
DATE ( YEAR ( TODAY() ), 1, 1) + 59,
DATE ( YEAR ( TODAY() )+1, 1, 1) + 59),
IF ( TODAY() < DATE (YEAR(TODAY()),MONTH(Birthdate),DAY(Birthdate)),
DATE(YEAR(TODAY()),MONTH(Birthdate),DAY(Birthdate)),
DATE(YEAR(TODAY())+1,MONTH(Birthdate),DAY(Birthdate))
)
)
![Page 25: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/25.jpg)
Conquer Leap Years
Always consider your…1. Inputs2. Outputs3. Time spans
@bethbrains
LEAP YEAR
APPROVED
![Page 26: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/26.jpg)
Advanced Formulas
![Page 27: Fearless Date Formulas: Leap Years and More by Beth Breisnes](https://reader031.vdocument.in/reader031/viewer/2022022413/58a27e121a28ab891a8b5183/html5/thumbnails/27.jpg)
Thank Y u