Need age in weeks and days

Topic Labels: Formulas
598 1
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Hi! I’m working on a database that tracks kittens placed in foster for a shelter. I know how to use DATETIME_DIFF to get weeks, but am hoping to get weeks and days. Ideally, I would like to have it read XwYd. Can anybody help?

1 Reply 1

To get the remaining number of days, you need to use DATETIME_DIFF to get the time in days, then use MOD to find the remainder after dividing by 7.

  DATETIME_DIFF({end date}, {start date}, 'days'),