Jul 15, 2024 11:52 AM
Hello -
I need to calculate a date, in certain circumstances, that is 75 days out from another date in my table. I’m using this formula:
SWITCH({S/N}, 'no', DATEADD(DOB, 75, 'days'), 'NOW',DATEADD(DOB, 75, 'days'),'NA')
which calculates correctly, but includes a time stamp in the results (2024-07-24T00:00:00.000Z). What do I need to do to my formula to get the date only, in mm-dd-yyyy format? My apologies if this is covered somewhere else. I’m not finding exactly what I need in the guides or past posts to this forum.
Thanks,
Susan
Solved! Go to Solution.
Jul 15, 2024 07:53 PM
Try this:
SWITCH(
{S/N},
'no',
DATETIME_FORMAT(
DATEADD(
DOB,
75,
'days'
),
'MM-DD-YYYY'
),
'NOW',
DATETIME_FORMAT(
DATEADD(
DOB,
75,
'days'
),
'MM-DD-YYYY'
),
'NA'
)
I'm curious about the formula you have though; both "no" and "NOW" appear to be adding 75 days to the DOB. Is that intended?
Jul 16, 2024 03:21 AM
Yes, that's intended. Thank you so much for your help. I wouldn't have gotten that right on my own!
Jul 15, 2024 03:05 PM
Jul 15, 2024 04:41 PM
I'm new to Airtable formulas. Can you tell me/show me where/how to add that to my formula?
Jul 15, 2024 07:53 PM
Try this:
SWITCH(
{S/N},
'no',
DATETIME_FORMAT(
DATEADD(
DOB,
75,
'days'
),
'MM-DD-YYYY'
),
'NOW',
DATETIME_FORMAT(
DATEADD(
DOB,
75,
'days'
),
'MM-DD-YYYY'
),
'NA'
)
I'm curious about the formula you have though; both "no" and "NOW" appear to be adding 75 days to the DOB. Is that intended?
Jul 16, 2024 03:21 AM
Yes, that's intended. Thank you so much for your help. I wouldn't have gotten that right on my own!