I have a variable now=getDate()
For example time now is "2014-01-15 21:35:46"
How do I extract the month, day, hour, minute to seperate variables?
For example month=01, day=15, hour=21, minute=35.
Can any one help?
Thanks!
-srjohn
extract the month, day, hour, minute from current time
Moderator: Martin
Re: extract the month, day, hour, minute from current time
I can use {triggertime,dateformat,HH:mm:ss} as the displayed text in notification.
For example it shows "21:30:30"
I want to save "21:30:30" as a variable.
So I create a script.
But Automagic reported error while executing the script.
Is there anything wrong?
Thanks,
-srjohn
For example it shows "21:30:30"
I want to save "21:30:30" as a variable.
So I create a script.
Code: Select all
myTime={triggertime,dateformat,HH:mm:ss}
Is there anything wrong?
Thanks,
-srjohn
Re: extract the month, day, hour, minute from current time
Look at the script action in this flow. It's not exactly what you want but it should help you forward.
http://automagic4android.com/flow.php?i ... 64b688391a
http://automagic4android.com/flow.php?i ... 64b688391a
Re: extract the month, day, hour, minute from current time
Thanks for the hints!MURTUMA wrote:Look at the script action in this flow. It's not exactly what you want but it should help you forward.
http://automagic4android.com/flow.php?i ... 64b688391a
Re: extract the month, day, hour, minute from current time
I think the problem with your code is that you forgot the quotation marks:srjohn wrote:I can use {triggertime,dateformat,HH:mm:ss} as the displayed text in notification.
For example it shows "21:30:30"
I want to save "21:30:30" as a variable.
So I create a script.But Automagic reported error while executing the script.Code: Select all
myTime={triggertime,dateformat,HH:mm:ss}
Is there anything wrong?
Thanks,
-srjohn
Code: Select all
myTime="{triggertime,dateformat,HH:mm:ss}"
Re: extract the month, day, hour, minute from current time
Martin, thanks!
It is working now!
-srjohn
It is working now!
-srjohn