how to get weekday

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
suda
Posts: 20
Joined: 02 Feb 2016 02:52

how to get weekday

Post by suda » 02 Feb 2016 03:09

I can't find function for getting weekday.
Please teach me how to get weekday.
For example,
1 monday ...
Thank you.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: how to get weekday

Post by Martin » 02 Feb 2016 14:14

Hi,

You can use the dateformat pattern to get the weekday. It would look like this in an action Notification on Screen to get Tuesday:
{triggertime,dateformat,EEEE}
There seems not to be a way to get the value in a numeric form (1 for Monday, 2 for Tuesday, ...) so you would have to use a map to get from Monday to 1.

Regards,
Martin

suda
Posts: 20
Joined: 02 Feb 2016 02:52

Re: how to get weekday

Post by suda » 02 Feb 2016 16:39

{triggertime,dateformat,EEEE}
This is my seeking thing!
Thank you.
Thank you.

Post Reply