Hi, Sorry I delete the first row.
I have one input:
<label>Periodo Analisis</label>
<default>
<earliest>-1month@month</earliest>
<latest>@month</latest>
</default>
<change>
<eval token="tperiodo2earliest">case(isnum('earliest'), earliest, earliest="now", Now(), 1=1, relative_time(Now(), 'earliest'))</eval>
<eval token="tperiodo2latest">case(isnum('latest'), latest, latest="now", Now(), 1=1, relative_time(Now(), 'latest'))</eval>
<eval token="tperiodo2earliestl">case(isnum('earliest'), strftime(earliest,"%d-%b-%Y %I:%M %p"), earliest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'earliest'),"%d-%b-%Y %I:%M %p"))</eval>
<eval token="tperiodo2latestl">case(isnum('latest'), strftime(latest,"%d-%b-%Y %I:%M %p"), latest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'latest'),"%d-%b-%Y %I:%M %p"))</eval>
And I want take that same time but with a year earlier and pass that to another input.
So I think it should be something like this:
<label>Periodo Analisis</label>
<default>
<earliest>-1month@month</earliest>
<latest>@month</latest>
</default>
<change>
<eval token="tperiodo1e">relative_time('earliest',"-1y")</eval>
<eval token="tperiodo1l">relative_time('latest',"-1y")</eval>
<eval token="tperiodo2earliest">case(isnum('earliest'), earliest, earliest="now", Now(), 1=1, relative_time(Now(), 'earliest'))</eval>
<eval token="tperiodo2latest">case(isnum('latest'), latest, latest="now", Now(), 1=1, relative_time(Now(), 'latest'))</eval>
<eval token="tperiodo2earliestl">case(isnum('earliest'), strftime(earliest,"%d-%b-%Y %I:%M %p"), earliest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'earliest'),"%d-%b-%Y %I:%M %p"))</eval>
<eval token="tperiodo2latestl">case(isnum('latest'), strftime(latest,"%d-%b-%Y %I:%M %p"), latest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'latest'),"%d-%b-%Y %I:%M %p"))</eval>
And then put it in the other selector:
<label>Periodo Comparacion</label>
<default>
<earliest>$tperiodo1e$</earliest>
<latest>$tperiodo1l$</latest>
</default>
<eval token="tperiodo1earliest">case(isnum('earliest'), earliest, earliest="now", Now(), 1=1, relative_time(Now(), 'earliest'))</eval>
<eval token="tperiodo1latest">case(isnum('latest'), latest, latest="now", Now(), 1=1, relative_time(Now(), 'latest'))</eval>
<eval token="tperiodo1earliestl">case(isnum('earliest'), strftime(earliest,"%d-%b-%Y %I:%M %p"), earliest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'earliest'),"%d-%b-%Y %I:%M %p"))</eval>
<eval token="tperiodo1latestl">case(isnum('latest'), strftime(latest,"%d-%b-%Y %I:%M %p"), latest="now", strftime(Now(),"%d-%b-%Y %I:%M %p"), 1=1, strftime(relative_time(Now(), 'latest'),"%d-%b-%Y %I:%M %p"))</eval></change>
But is not worwing good.
And I have another peculiarity, that I have to give it the format so I can search later in a KVStore.
Yes Im showing the time thats why I give it the format wiht strftime.
... View more