Date manipulation and display

Hi! I need help to figure out how to work with dates with Adalo.

I have a database collection “Clientes” with properties DateEnd, DateBegin, NbWeek and NbDay.

DateEnd is choose by the user.

I need to manipulate DateEnd to get these informations:

DateBegin = 280 days before DateEnd
NbWeek = the number of full weeks between today and DateBegin.
NbDay = the number of remaining days between today and DateBegin

BeginDate is 2022-06-25
NbWeek is 22
NbDay is 4


Solution find.

NbWeek= INT( (TODAY-DateBegin) / 7
NbDay = ( INT(TODAY) - DateBegin ) - (INT ( (INT (TODAY) - DateBegin) / 7 ) * 7 )


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.