Page 1 of 1

Question on time & date variables

Posted: Mon Apr 05, 2010 11:47 pm
by evk
Hi all,
I'm working to make an "almanac" page on my web page.
I need help to make html code (or xml?):unsure:
to view someting like (for example):
"Today Max Pressure= 1013.1mb at 00:58 (01.04.10)"

The variable "day1_thb1_pressmax_time" contains this string "20100405225755" :ohmy: but I don't know how to divide the Date from the Hours.
Can someone reply with a piece of code to explain the method?
Thanks in advance....
Giuseppe

Re:Question on time & date variables

Posted: Tue Apr 06, 2010 10:22 am
by skyewright
evk wrote:The variable "day1_thb1_pressmax_time" contains this string "20100405225755" :ohmy: but I don't know how to divide the Date from the Hours.
You can use the # feature of Meteohub HTMP Templates to split out parts of the date, as described in section 3.4 of the manual.

e.g. if [actual_localdate#AH] is 20100405235900 then

[actual_localdate#AD] gives 2010 (the year)

[actual_localdate#EF] gives 04 (the month)

[actual_localdate#GH] gives 05 (the day)

[actual_localdate#IJ] gives 23 (the hour)

[actual_localdate#KL] gives 59 (the minute)

Does that make sense?

Re:Question on time & date variables

Posted: Wed Apr 07, 2010 1:19 pm
by evk
Hi skyewright,
Yes...it make sense!!;)
In the next hours I will try to make a web page.
Thanks, for your help.
Giuseppe

Re:Question on time & date variables

Posted: Thu Apr 08, 2010 1:22 pm
by evk
Hi,
this is the first result of my new almanac page:
Is in Italian,
http://www.latinacittameteo.altervista. ... nacco.html
Any comment is apreciated.
Ciao
Giuseppe