Template issue - is there a workaround? **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Template issue - is there a workaround? **solved**

Post by ConligWX »

I am trying to setup a template value that gives the max wind with time and am/pm like so:

Code: Select all

[wind0wind-dmaxtime=apm.ij]:[wind0wind-dmaxtime=apm.kl] [wind0wind-dmaxtime=apm.op]
if the max wind time was before 10 the value will be 01 02 03 etc.

if there anyway to truncate the 0 from this time value, for example:

9:34 am instead of 09:34 am ?
Last edited by ConligWX on Wed Jan 09, 2019 6:06 pm, edited 1 time in total.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7876
Joined: Mon Oct 01, 2007 10:51 pm

Re: Template issue - is there a workaround?

Post by admin »

two ways:

Code: Select all

#if#[wind0wind-dmaxtime=apm.i:0] == 0#then#[wind0wind-dmaxtime=apm.i:0]#else#[wind0wind-dmaxtime=apm.ij]#fi:[wind0wind-dmaxtime=apm.kl] [wind0wind-dmaxtime=apm.op]

Code: Select all

{* [wind0wind-dmaxtime=apm.ij:0] *0}:[wind0wind-dmaxtime=apm.kl] [wind0wind-dmaxtime=apm.op]
User avatar
ConligWX
Platinum Boarder
Platinum Boarder
Posts: 329
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Re: Template issue - is there a workaround?

Post by ConligWX »

Thanks for the tip.
Post Reply