I'd like to add a number of hrs, h, to the current date/time to create a new variable I can use with dateformat to generate a new date/time in the future. Can't seem to get the syntax right. 
Anyone know what the expression(s) should look like?
			
									
									
						Date calculations
Moderator: Martin
Re: Date calculations
Use addHours();
Or you can just use the 3 directly.
{t} now is 3 hours from the triggertime. You can use dateformat later to show in the format you want.
			
									
									Code: Select all
houradd = 3;
t = addHours(triggertime, houradd);Code: Select all
t = addHours(triggertime, 3);Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
						Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Date calculations
Great - there's always a function I've not yet found!