Calculating Days Between two Dates

Calculating Days Between two Dates

Learn how to how to calculate days between today and dynamic dates from your database

In this tutorial we will show you how to calculate days, between today and dynamic dates from your database.

Step by Step

We created a dynamic table which displays dates from our database. We'd like to show the days until then as well. First, add a new app connect component (1). Open the data menu (2). Add date and time component (3). This variable returns the current date and time.

You can select the refresh interval for it. This is useful if you're creating some kind of countdown timer so you can set the interval to seconds. In our case, days will work just fine (1-2).

Click inside the repeat region, where you need the time until displayed (1). Click insert binding (2). Select the date and time variable (3). Click the formatter button (4). 

Right click the expression (1). Under date and time, select days until (2-3).

Select date (1-2). 

Add the date from your database to calculate the time to (1-2).

And we are done! Let's preview the results.

You can see the dates from our database on the left and the days until then on the right. That's how easy it is to calculate days between today and a date from your database.

Comments

Be the first to write a comment

You must me logged in to write a comment.