am/pm conditions

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
Ghostnet12
Posts: 10
Joined: 23 Oct 2014 14:41

am/pm conditions

Post by Ghostnet12 » 08 Dec 2014 13:38

Can any one help me with adding am and pm conditions for time pleas. Thnx
Gh057N3712

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

Re: am/pm conditions

Post by Martin » 08 Dec 2014 17:09

Hi,

Sorry, I don't understand what you want to achieve, could you please explain what your goal is or what your flow should do?
You can use condition Time Range to check if the time is currently between 1am and 2am when a flow is executed.

Regards,
Martin

Ghostnet12
Posts: 10
Joined: 23 Oct 2014 14:41

Re: am/pm conditions

Post by Ghostnet12 » 08 Dec 2014 21:26

I have a flow that have made a short cut for on my pull down screen of my phone. Any when I press the icon it speaks out loud "its 2:30". Is there any way I can throw in a variable or condition that will add the am or pm condition to the time. I have tried adding (DA) at the end of a time date trigger algorithm. All it adds is " 8am" at the end. Which doesn't help at all.
Gh057N3712

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

Re: am/pm conditions

Post by Martin » 09 Dec 2014 17:59

You can use the character a in a date format to show the AM/PM text. Something like this should work:
{triggertime,dateformat,hh:mm a}

The supported patterns are documented on this page:
Date Format Pattern

Post Reply