Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Adding a value to the current hour

OP dgrasley

16th January 2014, 03:16 AM   |  #1  
OP Junior Member
Thanks Meter: 2
 
3 posts
Join Date:Joined: Jan 2014
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?
16th January 2014, 08:43 AM   |  #2  
Senior Member
Thanks Meter: 31
 
104 posts
Join Date:Joined: May 2012
Quote:
Originally Posted by dgrasley

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.
16th January 2014, 03:13 PM   |  #3  
kwerdenker's Avatar
Recognized Themer
Flag Probably the Zooper Forums
Thanks Meter: 2,394
 
1,421 posts
Join Date:Joined: Apr 2010
Donate to Me
More
Quote:
Originally Posted by dgrasley

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)$
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes