[Solved] How to store future dates in Thunkable X?

Hi all,

I am wondering if it is possible to store a future date in Thunkable X. For example I have the block of code below which stores the current date in an airtable spreadsheet (format DD/MM/YYYY). Is it possible to get a future date. i.e. date = current date + 7 days. for example. I think this used to be easy with Thunkable classic as it had a clock component. In Thunakable X, I can only seem to find the get current date/time under the device menu.

Thanks in advance.

date

2 Likes

Hi there,

You would have to design a function to get a future date.
If we imagine you only want to get dates 7 days in the future, you’d need to:

get how many days are in the current month
add 7 to the current day of the month (call this result x)
if x > days in current month, subtract days in current month from x and add 1 to current month (to get date at beginning of next month)

You can find APIs that call a calendar function if that would be helpful to you. Check out actech’s replies in this thread

Thanks,
Jane

1 Like