Show only hour-min in table

Discussion about generation of graphs and tables
Post Reply
chrysnic
Posts: 2
Joined: Sat Oct 08, 2016 10:10 am

Show only hour-min in table

Post by chrysnic » Sat Oct 08, 2016 10:17 am

Hi all,

I have a chart (table) definition which summarizes the current month's weather data (each day occupies a row of the generated table).

For values that refer to TIME, I would like to see only the hh:mm part of the time-stamp, not the entire time-stamp.

With the following line of code in my definition, I get the entire time-stamp:

sid2=th0 sunit2= sname2=Temp<br>Max<br>Time ssel2=tempmaxtime

How can I only get the hh:mm part?

The syntax "_11_5" does not work here.

Here is my entire definition:

timeframe=1M
res=day1

gtitle=Monthly_Report # name of graph
gheight=800 # height in pixels of graph
gwidth=550 # width in pixels of graph
gtype=table # type of graph
glunit=Date # set header string for first column
grunit=%e_%b_%Y # set date format string for notation on months (ala gnu c strftime)
gtrim=0
gtablestyle=cellpadding=4_style="background-color:#fafafa;border-collapse:collapse"
gtdheadstyle=style="background-color:#336699;font-weight:bold;text-align:center;color:#FFFFFF;"
gtdstyle=style="border:1px_#CCCCCC_solid;text-align:right;font-size:.9em;color:#404040;"

sid0=th0 sunit0= sname0=Temp<br>Ø<br>°C ssel0=temp
sid1=th0 sunit1= sname1=Temp<br>Max<br>°C ssel1=tempmax
sid2=th0 sunit2= sname2=Temp<br>Max<br>Time ssel2=tempmaxtime
sid3=th0 sunit3= sname3=Temp<br>Min<br>°C ssel3=tempmin
sid4=th0 sunit4= sname4=Temp<br>Min<br>Time ssel4=tempmintime
sid5=th0 sunit5= sname5=Hum<br>% ssel5=hum sprec5=0
sid6=th0 sunit6= sname6=Hum<br>Max<br>% ssel6=hummax
sid7=th0 sunit7= sname7=Hum<br>Max<br>Time ssel7=hummaxtime
sid8=th0 sunit8= sname8=Hum<br>Min<br>% ssel8=hummin
sid9=th0 sunit9= sname9=Hum<br>Min<br>Time ssel9=hummintime
sid10=thb0 sunit10= sname10=Pressure<br>hPa ssel10=seapress
sid11=thb0 sunit11= sname11=Pressure<br>Max<br>hPa ssel11=seapressmax
sid12=thb0 sunit12= sname12=Pressure<br>Max<br>Time ssel12=pressmaxtime
sid13=thb0 sunit13= sname13=Pressure<br>Min<br>hPa ssel13=seapressmin
sid14=thb0 sunit14= sname14=Pressure<br>Min<br>Time ssel14=pressmintime
sid15=rain0 sunit15= sname15=Rain<br>mm ssel15=total
sid16=wind0 sunit16= sname16=Wind<br>Ø<br>km/h ssel16=wind sfactor16=3.6
sid17=wind0 sunit17= sname17=Wind<br>Max<br>km/h ssel17=gustmax sfactor17=3.6
sid18=wind0 sunit18= sname18=Wind<br>Max<br>Time ssel18=gustmaxtime sfactor18=3.6


Any help will be appreciated!

hymrog
Posts: 9
Joined: Tue Feb 11, 2014 11:24 pm

Re: Show only hour-min in table

Post by hymrog » Fri Oct 21, 2016 5:29 pm

Hello -

Try this: ssel1=tempmaxtime sprec1=16

chrysnic
Posts: 2
Joined: Sat Oct 08, 2016 10:10 am

Re: Show only hour-min in table

Post by chrysnic » Sat Oct 22, 2016 8:09 am

Thanks,

I think we are getting close, but there is a problem. The "sprec" command with a POSITIVE number (e.g., sprec1=16) displays as many characters as the number, starting from the LEFT. And this works fine. In my case, however, I need to display characters from the RIGHT of the time stamp. A NEGATIVE number (e.g., sprec1=-8) should work, according to the instructions, but, unfortunately, it does not (in my case). When I put a negative number, nothing happens (the whole time stamp is displayed, as before).

Thanks.

hymrog
Posts: 9
Joined: Tue Feb 11, 2014 11:24 pm

Re: Show only hour-min in table

Post by hymrog » Fri Oct 28, 2016 3:47 pm

Hello -

I understand what you are looking for and there is clearly a bug when wanting to display data from the left. Not sure if this forum is being monitored anymore by the administrator but besides the bug that you have reported there also appears to be a problem with the wind data as well.

I sent an email to the meteobridge email address of the administrator but have not heard back and that was earlier in the week.

Thanks

Post Reply