anyway to cover it to 12 hours format?
> Variable Split to get the two parts.
>
> Variables Subtract to take 12 from the first part.
>
> if < 12, add "am" to the result, otherwise add "pm" to the result.
Or, let tasker do the heavy work for you... :)
get time (61)
A1: Variable Convert [ Name:%TIMES Function:Seconds to Long Date Time Store Result In:%time ]
A2: Variable Split [ Name:%time Splitter: Delete Base:Off ]
A3: Flash [ Text:%time(5) Long:Off ]
> In my defence, you use it more than me :-)
I see the method to your madness...
Your method = Requires better understanding of tasker actions = More educated tasker users = Less Questions...
I get it.... :)
----------
>
> I think what you are really asking is how do I convert from zulu time (the value contained in the variable %TIME) to standard time (the value 2:00 pm)
Would not the approach i I listed be much simpler?
For clarity if you have a "Zulu" Time in a variable (IE 0.45) that is not the current time and would like to convert that you can not use the %TIMES variable listed in my first post. To do this you just need to add the date with a space to your zulu time then convert to seconds then convert to 'long date Time'
That is still a much simpler solution then doing all the math.
get time (61)
A1: Variable Set [ Name:%zulu To:0.45 Do Maths:Off Append:Off ]
A2: Variable Set [ Name:%zulu To:%DATE %zulu Do Maths:Off Append:Off ]
A3: Variable Convert [ Name:%zulu Function:Date Time to Seconds Store Result In:%seconds ]
A4: Variable Convert [ Name:%seconds Function:Seconds to Long Date Time Store Result In:%time ]
A5: Flash [ Text:%seconds Long:Off ]
A6: Variable Split [ Name:%time Splitter: Delete Base:Off ]
A7: Flash [ Text:%time(5) Long:Off ]
Okay, I skipped a few, but you get where I'm going.
When writing about a solution to a question, I want the reader to intuitively understand what each action is doing, and I assume the person asking a question, unless otherwise manifested, is probably less experienced than the person answering the question. You are clearly more experienced, more experienced that I am! I would never have come up with your solution to the question. Unfortunately, my head just doesn't work that way. (I suck at solving most complex puzzles that don't rely on a clear process to solve them, and I have relatively little experience with mathematical algorithms.)
Then we have the classic QA problem: I know what I did/wrote and it is self documenting. Of course it is... to you! You wrote the code. The only real test of self-documenting is if Glen understands what you wrote without having to spend time on the web figuring out what each action does. For what it is worth, I don't understand what each of your actions does, but that is just me. I could understand each action with a little work. I don't mind doing the work. In fact I will. But that means your solution isn't self documenting, at least to me.
Which brings me to my last point. (Thank god, you say!) I came to preach to the software development teams I managed, Write code for the lowest common denominator and if you can't do that, make thorough comments in your code. (This violates at least one tenant of self-documenting code, I know, but it is better than having four developers standing around trying to figure out what you did.) What was the lowest common denominator, because clearly that denominator isn't a constant? It was me. I knew the basic tenants of OO development, had a working knowledge of Java, and had usually created the system architecture, which I tried very hard to make understandable by its very structure. I didn't always succeed.
I once had a partner in the firm I was working for ask me, Why did you try to implement such a complex solution? A lack of clear requirements creates complexity, I answered. He wasn't impressed, but I still stand by my statement.
Best,
Christopher