Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,209 Members 36,883 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Adding a value to the current hour

Tip us?
 
dgrasley
Old
#1  
Junior Member - OP
Thanks Meter 2
Posts: 3
Join Date: Jan 2014
Default [Q] Adding a value to the current hour

Is there ANY way to add a number (1) to the current hour? I've been trying to figure it out for hours but I'm not getting anywhere.

I've tried variations of this:
$#Dmm#>50&&#Dmm#<60?hour plus one is (#Dh#+1)$

Anyone?
 
HyperAbarth
Old
#2  
Senior Member
Thanks Meter 31
Posts: 104
Join Date: May 2012
Quote:
Originally Posted by dgrasley View Post
Is there ANY way to add a number (1) to the current hour? I've been trying to figure it out for hours but I'm not getting anywhere.

I've tried variations of this:
$#Dmm#>50&&#Dmm#<60?hour plus one is (#Dh#+1)$

Anyone?
Hi;
Here I've insert a code to add Day to Date:
http://forum.xda-developers.com/show....php?t=2607763
Probably same syntax could work also for time ... but there is a BIG problem:
Zooper consider Date as a number then if I add 10 to 25th January I obtain 35th January!!! Then I can't use this for my purpose
I don't know if you will have the same problem also with Time.
 
kwerdenker
Old
#3  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 2,231
Posts: 1,382
Join Date: Apr 2010
Location: Probably the Zooper Forums

 
DONATE TO ME
Quote:
Originally Posted by dgrasley View Post
Is there ANY way to add a number (1) to the current hour? I've been trying to figure it out for hours but I'm not getting anywhere.

I've tried variations of this:
$#Dmm#>50&&#Dmm#<60?hour plus one is (#Dh#+1)$

Anyone?
Try it like this
Code:
$#Dmm#>50&&#Dmm#<60?(#Dh#+1)$
and it should work. Zooper seems to have a problem if you try to mix characters/text and math. If you want to have text AND math in one text module, split them up so you have something like this
Code:
hour plus one is $#Dmm#>50&&#Dmm#<60?(#Dh#+1)$
If you need the text also to be dependent on the conditional, you'll have to use it twice:
Code:
$#Dmm#>50&&#Dmm#<60?hour plus one is $$#Dmm#>50&&#Dmm#<60?(#Dh#+1)$

Please use the forums for your Zooper related questions. I won't respond to PMs with questions that can/should be asked there. Thank you.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes