# Need to get the day number based on signup

**URL:** <https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804>\
**Category:** Get Help\
**Created:** [October 23, 2023, 5:10pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804 "2023-10-23T17:10:02Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 23, 2023, 5:10pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/1 "2023-10-23T17:10:02Z")

</div>

I need to get a simple date added and then modified for each day, in the database to indicate the day a user is on. So right now I am trying to get the signup form to add the signup date and create the first instance of a day number field. So on the day of the signup, it should be day 1, the next day after, day 2, and so on.

What I’ve tried isn’t working. I have the DB with the day field under the users table/collection set to a number field (tried with text and a custom formula but that also didn’t seem to work). In the form, I have a hidden calculated field that I tried a bunch of formulas with but never got an input submitted properly to the DB. This is what I thought would work: round(current time - signup date)/1,0)+1. Both fields were set to date/time (but also experimented just with date).

Anyone know how to first create the simple calculation in the signup to DB flow, and then have it auto-update in the DB based on elapsed day?

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 23, 2023, 6:06pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/2 "2023-10-23T18:06:26Z")

</div>

Round((current time-tomorrow),0)+1 seems to work on day one, but will this work to increment each day?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [October 24, 2023, 1:23pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/3 "2023-10-24T13:23:01Z")

</div>

Hi @Rninja,

Did you try this one? It worked for my existing user and newly just-added user.

 ![Screenshot 2023-10-24 at 16.22.09](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/b/5/b59aa326a7ab874c8dbd65901b2f95f43cc61c44.png)

Best,  
Victor.

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 24, 2023, 1:38pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/4 "2023-10-24T13:38:09Z")

</div>

Hi @Victor and Thanks. What is “User created Date” set to? I haven’t tried that particular format but will.

Do you know if what I posted last will increment? I feel like it won’t but not sure about the logic to get it to.

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [October 24, 2023, 2:05pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/5 "2023-10-24T14:05:03Z")

</div>

Hi @Rninja,

User created date is the field “created date” in Users collection. It is a built-in field which stores the datetime value when a record was created. “Created date” and “Updated date” fields exist in all collections.

Round(current time-tomorrow) will result in either -1 or 0. Time is stored as a number of days since 1/1/1970, and the fraction is the “day percentage” (so 12:00 PM in UTC+0 timezone will be 0.5). If you’re not in UTC, then your local timezone difference is applied when displaying time. So if you’re operating in datetime space (not using pure date anywhere), when you deduct current time from tomorrow you are deducting smth like 19654,742 - 19655 (if you’re in UTC+0). When you round that you will get either -1 or 0.

Best,  
Victor.

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 24, 2023, 3:13pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/6 "2023-10-24T15:13:18Z")

</div>

Thanks for that explanation @Victor . I left the initial calculation intact but I guess I could just set it to “1” when someone registers, then add an action to update the record when viewing the home screen. Is that the best way though, or is there a more efficient/graceful way to update the day number by date? The day after signup, it should be day 2, and if I leave the calculation I had above, it won’t change (nothing auto-calculating outside of the signup process itself IMHO). The format you have above seems to work too, but it won’t auto-update once a user signs up, am I right?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [October 26, 2023, 12:12pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/7 "2023-10-26T12:12:57Z")

</div>

Hi @Rninja,

Sorry, but I’m not sure I understand what would you like to achieve.

My example is how to display number of days since a particular user has signed up. If you would like record the day when user opened the app for the last time, you will need to add a separate property for that and update it to Current Time when a user opens the app. So you could place this action on a Home screen.

Please keep in mind that if you create on-screen-enter action, it will be executed every time a user visits this screen, which will affect your actions counter (and therefore may increase costs). So it might be a good idea to make this action conditional - you can try smth like “execute when last visit date is before start of today”. Testing is required - can’t provide detailed solution now.

Best,  
Victor.

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 26, 2023, 3:19pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/8 "2023-10-26T15:19:59Z")

</div>

So what I initially meant was to get the day counter started as a user signed up, then as each day elapsed, increment the day counter to match records for a daily task list in the database. So since each user can sign up on another date, the counter needs to be specific to them. I was just unsure if the recommendation you provided increased daily, but it seems that it would?

Appreciate the info regarding wasted actions, I do need to be aware of how much I’d be using when I switch to a paid subscription (and already hit 100% of the free record allotment 😆 ).

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 26, 2023, 3:30pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/9 "2023-10-26T15:30:32Z")

</div>

@Victor ,I tried the formula you provided and changed the database property to a text field, but upon sign up, it didn’t record a value. So the DB is empty for the Day Number property… Am I missing something?

I did these steps:  
Changed the DB property to a text field called “Day Number”  
Added a custom formula to an automatic field in the form with the formula you provided (INT(current time - user created date)+1

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 26, 2023, 4:22pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/10 "2023-10-26T16:22:31Z")

</div>

How do I actually auto-increment the day number? The form won’t add it in my opinion, because the user isn’t created yet, so the signup date or created date doesn’t exist - thus no entry. Thus empty DB records…

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 30, 2023, 3:25pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/11 "2023-10-30T15:25:40Z")

</div>

Just wanted to ping you or anyone else @Victor who may know the answer to this.

---

<div class="post-metadata">

**Author:** ![Rozza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rozza/32/22780_2.png) [@Rozza](https://forum.adalo.com/u/Rozza)\
**Post date:** [October 30, 2023, 3:48pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/12 "2023-10-30T15:48:54Z")

</div>

Do an extra update action straight after the signup / create user ?

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 30, 2023, 4:02pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/13 "2023-10-30T16:02:16Z")

</div>

So ideally the homepage would update the user’s list items based on the signup date and day number. So If I signed up yesterday, I should get day 2 list items and not day 1 list items, and so on. Problem is, the action I have keeps updating the day number every time the page is refreshed, and if I remove the action, the user stays on day 1 for perpetuity.

---

<div class="post-metadata">

**Author:** ![Rozza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rozza/32/22780_2.png) [@Rozza](https://forum.adalo.com/u/Rozza)\
**Post date:** [October 30, 2023, 4:36pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/14 "2023-10-30T16:36:02Z")

</div>

I would do this. Put a conditional update user action on the homescreen.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/0/b/0bd2118845ef47d52a9bfcb69c646665bd7602f5.png)  
Then filter your list so that day = logged in user current\_day

👍

When a user signs up on Day 1 (Monday), they see Day 1 content, if they visit next on Wednesday they see Day 2 content. When they visit on Thursday… Day 3 content.

It gets trickier if you want to skip content if the user has not opened the app that day. ie. Monday = 1, Tuesday = 2, Wednesday missed, Thursday = 4. I think Victor has given you the goods for that.

Which solution do you need?

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 30, 2023, 8:19pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/15 "2023-10-30T20:19:25Z")

</div>

That’s helpful. I got it to work with a combination of conditional statements and the particular signup date. Seems to be working now, and I think it reduces the use of actions… on that note - is there a log or way yo access the number of actions actually taking place? Like a counter?

---

<div class="post-metadata">

**Author:** ![Rozza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rozza/32/22780_2.png) [@Rozza](https://forum.adalo.com/u/Rozza)\
**Post date:** [October 30, 2023, 8:25pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/16 "2023-10-30T20:25:12Z")

</div>

Good stuff 👍

> **[App Actions Dashboard](https://help.adalo.com/action-basics/app-actions-dashboard)**
>
> The Actions dashboard can help you monitor the actions used by the apps in your account as well as see more detailed information about your billing cycle.

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 31, 2023, 1:59pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/17 "2023-10-31T13:59:12Z")

</div>

Thanks @Rozza!

---

<div class="post-metadata">

**Author:** ![Rninja](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rninja/32/31691_2.png) [@Rninja](https://forum.adalo.com/u/Rninja)\
**Post date:** [October 31, 2023, 2:03pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/18 "2023-10-31T14:03:01Z")

</div>

Weird but I don’t see what Adalo has in their help docs, just an advertising banner for seeing plan options, even though they say you don’t need a paid account to see it. No other buttons or options to skip or cancel the upsell banner… 😑

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [November 10, 2023, 2:03pm UTC](https://forum.adalo.com/t/need-to-get-the-day-number-based-on-signup/42804/19 "2023-11-10T14:03:55Z")

</div>

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