Hi Steve,
I'm trying to work out how I can change the format of any date on my all-time records page. For example, the tag for my all-time highest temperature - #TtempH - shows "at 16:19 on 02 July 2009".
I want to lose the leading zero and make it "at 16:19 on 2 July 2009". The tag appears to contain the words "at" and "on" as well as the time and date elements.
How would I add a format command to drop that leading zero but retain "at" and "on"?
LATER:
I've worked out how to change the all-time time/date formats but can't work out how to drop the leading zero on my home page where it shows the current date and time.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Question regarding Date/Time format
Moderator: daj
-
RayProudfoot
- Posts: 3602
- Joined: Wed 06 May 2009 6:29 pm
- Weather Station: Davis VP2 with Daytime FARS
- Operating System: Windows XP SP3
- Location: Cheadle Hulme, Cheshire, England
- Contact:
-
captzero
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Question regarding Date/Time format
Hi Ray,
Most date and time tags have an optional 'format' parameter, e.g: <#YearTempHT format=hh:nn>. You can override the default display format for that item, using the format specifiers in the Cumulus help file (Cumulus help file> Creating a web site> Webtags> Parameters)
I think <#TtempH format="hh:nn on d mmmm yyyy"> should work
Cheers
Most date and time tags have an optional 'format' parameter, e.g: <#YearTempHT format=hh:nn>. You can override the default display format for that item, using the format specifiers in the Cumulus help file (Cumulus help file> Creating a web site> Webtags> Parameters)
I think <#TtempH format="hh:nn on d mmmm yyyy"> should work
Cheers
Last edited by captzero on Fri 19 Aug 2011 3:29 am, edited 1 time in total.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
RayProudfoot
- Posts: 3602
- Joined: Wed 06 May 2009 6:29 pm
- Weather Station: Davis VP2 with Daytime FARS
- Operating System: Windows XP SP3
- Location: Cheadle Hulme, Cheshire, England
- Contact:
Re: Question regarding Date/Time format
Thanks Dan. I have since worked out how to change the formatting on my alltime records page.
The one I'm having problems with is the leading zero on my home page.
Conditions at local time 22:10 on Friday 05 August 2011
I tried adding a format to the #day tag to drop the leading zero but this didn't work. Here's what I changed:-
<#day format=d>
Any ideas?
The one I'm having problems with is the leading zero on my home page.
Conditions at local time 22:10 on Friday 05 August 2011
I tried adding a format to the #day tag to drop the leading zero but this didn't work. Here's what I changed:-
<#day format=d>
Any ideas?
-
captzero
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Question regarding Date/Time format
I would do what you have done. The help says 'Most date and/or time tags have an optional 'format' parameter' buy maybe the <#day> tag isn't one of them. Steve will know.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
RayProudfoot
- Posts: 3602
- Joined: Wed 06 May 2009 6:29 pm
- Weather Station: Davis VP2 with Daytime FARS
- Operating System: Windows XP SP3
- Location: Cheadle Hulme, Cheshire, England
- Contact:
Re: Question regarding Date/Time format
Thanks Dan. It does look as though it isn't currently possible but I'm hopeful Steve will come to the rescue. 
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Question regarding Date/Time format
You say you're trying to format the <#day> tag (which doesn't have a format parameter currently), so I assume you're not using the <#time> tag (which does have a format parameter) as in the original 'standard' page. Is there any reason you can't use that?
Steve
-
RayProudfoot
- Posts: 3602
- Joined: Wed 06 May 2009 6:29 pm
- Weather Station: Davis VP2 with Daytime FARS
- Operating System: Windows XP SP3
- Location: Cheadle Hulme, Cheshire, England
- Contact:
Re: Question regarding Date/Time format
Thanks Steve. I'm now using the time webtag and have successfully formatted it to remove the leading zero.