Skip to main content
Solved

Calculate dates

  • February 8, 2023
  • 2 replies
  • 21 views

Lisa_Wetherby
Forum|alt.badge.img+6

I know this is super simple, but I am new to formulas. Here's my problem:

I have volunteers signing up for a rotation and I'm trying to make a view that will capture their hotel needs, which are generally: Check In one day BEFORE their First Day BOG and Check Out one day AFTER their Last Day BOG (BOG = Boots on the Ground).

This is the formula I am using to get their Check In date: DATEADD({First Day BOG},-1,'days')

It is not calculating correctly.

This is the formula I am using to get their Check Out date: DATEADD({Last Day BOG},1,'days')

Also not calculating correctly.

Help & TIA

Best answer by bruceconsulting

Hi Lisa,

Here's the formulas you want:  

DATETIME_FORMAT(DATEADD({First Day BOG}, -1,'day'),'M/D/YYYY')
DATETIME_FORMAT(DATEADD({Last Day BOG}, 1,'day'),'M/D/YYYY')

If you want to talk about this further or if you ever need additional help, please schedule some time with me.  Here's my Calendly link: https://calendly.com/d/z2y-gh2-5rm/30-minute-help-meeting
 
Jody

2 replies

bruceconsulting
Forum|alt.badge.img+13
  • Inspiring
  • 56 replies
  • Answer
  • February 8, 2023

Hi Lisa,

Here's the formulas you want:  

DATETIME_FORMAT(DATEADD({First Day BOG}, -1,'day'),'M/D/YYYY')
DATETIME_FORMAT(DATEADD({Last Day BOG}, 1,'day'),'M/D/YYYY')

If you want to talk about this further or if you ever need additional help, please schedule some time with me.  Here's my Calendly link: https://calendly.com/d/z2y-gh2-5rm/30-minute-help-meeting
 
Jody

Lisa_Wetherby
Forum|alt.badge.img+6
  • Author
  • Participating Frequently
  • 9 replies
  • February 8, 2023

It worked! Not sure why I needed the DATETIME_FORMAT - it was actually formatted fine - but I'm happy with the results. Thank you!