HOW CAN I get weekday? sunday, monday

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 :sunglasses:

Idon’t know what you mean…

When you say

Which do you mean:

  1. Current Day of the week?
  2. Day of week for a particular date other than the current day (past or present)?
  3. 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
image

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.

1 Like

I solved the problem by your good tip… Thanks

image

1 Like

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…