Subscription Expiry Date and Time

hi all,

i’m trying to figure out how to add (## days) in subscription record so when when updating current subscription at checkout i just tell it ‘current time + current subscription date+time’ but when i go in to create the record the date and time is allowing me to only pick a date as oppose to entering ‘(+)6 days’.

any suggestions on this?

what i have opted to do is adding a number property and labeling it "date+time "and input the amount of days in the collection record and then updating subscription t checkout ‘current time’ + ‘current subscription>expiry date’. I AM OPEN TO SUGGESTIONS!<


I’d add current time + number of days (formula). Remmber, Adalo uses UNIX timestamps, so really days*86400

hi @Erik
not sure if your suggestion is the same that i’ve done;


‘Subscription Plan > Expiry date’ would be the number property used. is this what you meant?

or is it…

is “Subscription Plan expiry date” a date? or a number?

I recommend doing “current time + 1209600” for a 14 day expiration (14*86400). Seems to be easier…

“subscription plan > expiry date” is a number property with the number of days (7, 14, etc) as the date limits to just selecting a date and not ‘date from now’.

i’m thinking this is what you’re suggesting?


Yep, that looks right to me. Give it a test!

Based on what we’re doing in our app, we’re using this formula:

Expiry - Date field
Product subscription duration - number field

Upon successful checkout on for eg. the Stripe component, update the user’s subscription expiry.

It should be: Start of today (or tomorrow, up to you) + product subscription duration (number, for eg. 30).

What will happen is the expiry date will then be: today’s date + 30 days, for eg. 7 Jul + 30 days = 6 Aug

Not sure about if it’s a date and time property, though. You could try Erik’s suggestion.

thanks @vancewong, but i don’t see where the ‘date field’ propoerty comes into play in updating the subscription?

also a follow-up @vancewong @Erik ,

my subscription db uses true/false property so how do i update the subscription to return to false when it has expired?

Typically, for subscriptions, you don’t have a “time” field. You could have a time field if you’d like, just that it’d be more complicated.

In my case, I only used a “date” field, so instead of having to multiply by 86400 seconds, I can just use an integer to represent the number of dates to add.

With regards to using true/false properties, there usually have to be a trigger to turn that switch on or off. You could use something like Zapier or Integromat to do that, but the costs will scale up pretty quickly if you have many users. Not sure if there’ll be a Stripe subscription widget soon on Adalo, but there’s a workaround that I’m using.

In my yoga booking app, the class book button checks if the user’s credits expiry is before the current date. If it is, then it’d send the user to a screen informing them of the credits expiry, and to buy a new class pack. That could be something you can consider as well :slight_smile:

thanks @vancewong

it occured to me earlier that what you meant is to INPUT ‘current time + plan > expiry date’ IN the date field property

what i’m understanding here (in my case scenario) is to trigger update action on home screen to check if looged in user > subscription > created date is before today then flip the switch… does this make sense?

@Erik @vancewong

can you share with me your best case scenario to flipping the switches (T/F) to False? i’m trying but i’m getting errors and i just need a bit of elaboration to better understand if i’m missing any significant step(s).

I use a splash screen for when they’re entering the app, if they’re overdue the get forced to a payment page. We don’t have any “switch”. We just prevent them from getting “into” the app.

thanks @Erik , i followed that tut you shared to do my set up.

However, in regards to your “restrict access” setup, what happens when their trial/subscription expires? How do they get reverted to “overdue” restricted access?

In that video I shared, we push them to a payments screen forcing them to pay to continue to use the app. If they don’t pay and try to log out and re log in, they’ll continually end up there until they pay…

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