How can I get weekday? sunday, monday…
you mean current week day?
make a list of text: [‘monday’,‘tuesday’, … , ‘sunday’]
call device>current “day of the week”, and use the resulting number as and index to the list you defined.
use apis
Idon’t know what you mean…
When you say
Which do you mean:
- Current Day of the week?
- Day of week for a particular date other than the current day (past or present)?
- List of names of days of the week
For #1, you can use the device blocks:
For #2, Thunkable does not have that feature, but as @eko.devs.apploroceo indicated, there may be a Web API you can use. That is a fairly advanced task.
For #3
Do some read watch play around if u want help first search community and if u dnt find any helpful topics ask us
The “current > day of the week” block returns a value from 1 to 7:
1 is Sunday
2 is Monday
3 is Tuesday
4 is Wednesday
5 is Thursday
6 is Friday
7 is Saturday
So all you need to do is create a local table to translate values to weekday names and use them in your app.
K
Take a look at this: Thunkable
Exactly what @Deluxe described. Just that I mentioned the use of a list of text instead of local table.
I solved the problem by your good tip… Thanks
Nice !! many ways to skin a cat… The fun part apart from solving the problem is to also improve the elegance of the solution. You may want to consider calling the “day of week” block only once, because any more blocks used costs time resources in the code.
I searched the methods in this community but…
Finally I found the easy method… See below my method…