Page 1 of 1

Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 2:55 am
by krmidas
I'm trying to get a value for the total number of days my station has been in operation (June 18, 2005). I'm assuming I should use the webtag <#DaysSince30Dec1899> , replacing Dec 30, 1899 with June 18, 2005. I wasn't sure about the formatting of the month name so I also tried it with "Jun" as well as "June" but no success. Am I misunderstanding the purpose of this webtag?


-Tom

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 8:18 am
by water01
That webtag is exactly what it says it is Days since 30th December 1899. The webtag you should be using is #DaysSinceRecordsBegan.

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 12:56 pm
by krmidas
Huh. What is the significance of Dec. 30, 1899?

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 1:12 pm
by steve
It's the 'base' date for storing dates and times in some systems. See https://cumulus.hosiene.co.uk/viewtopic.php?f=4&t=8765

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 1:20 pm
by water01
Mainframes (the old computers I started on in 1969!!) used to use the number of days since the 1st January 1900 as a means of holding dates, but this all got fouled up by the first popular spreadsheet Lotus 123 that had a bug in it for leap years and when Microsoft issued the first versions of Excel in 1995 it was decided in order to keep them compatible and correct the bug to use 30th December 1899!!
Actually for the people here there is a little bit of a story about thus date choice.
Logically a good starting date with the January 1, 1900, so why a off that date?
It turns out that many years ago Lotus 123 was one of the more popular spreadsheets in the marketplace. It also turns out that Lotus 123 had a date calculation bug in which it assumed that the year 1900 was a leap year.
So for issues of compatibility and making the calculations remain the same across the two products, Excel by design and on purpose adopted the same date calculation bug!
So when they were setting up the date calculations system for VBA, there was a decision made to offset it by one day, as that would result in the same number of days between two different dates as what you get in Excel and Lotus.
So in theory I can't really say the above is 100% true, but they simply just offset it by one day to be different and to reduce the confusion issue.
There is some explains and details here:
http://www.cpearson.com/excel/datetime.htm
If you google you can find loads more info and yes a year with 2 zeros or more i.e. 1900 or 2000 is not a leap year according to the rules to calculate dates.

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 2:07 pm
by steve
water01 wrote:a year with 2 zeros or more i.e. 1900 or 2000 is not a leap year according to the rules to calculate dates.
1900 wasn't a leap year, but 2000 was.

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 2:33 pm
by RayProudfoot
steve wrote:
water01 wrote:a year with 2 zeros or more i.e. 1900 or 2000 is not a leap year according to the rules to calculate dates.
1900 wasn't a leap year, but 2000 was.
IIRC if the year is exactly divisible by 50 it's a leap year.

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 2:36 pm
by steve
RayProudfoot wrote:
steve wrote:
water01 wrote:a year with 2 zeros or more i.e. 1900 or 2000 is not a leap year according to the rules to calculate dates.
1900 wasn't a leap year, but 2000 was.
IIRC if the year is exactly divisible by 50 it's a leap year.
No, 'century' years have to be divisible by 400 to be leap year. 1900 is divisible by 50 but isn't a leap year.

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sat 30 Mar 2013 2:39 pm
by RayProudfoot
steve wrote:No, 'century' years have to be divisible by 400 to be leap year. 1900 is divisible by 50 but isn't a leap year.
Yep, that's it. I should have thought about it a bit more before posting. :oops:

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sun 31 Mar 2013 2:38 am
by krmidas
water01 wrote:The webtag you should be using is #DaysSinceRecordsBegan.
Actually that won't help me either, since my station online date was before I started using Cumulus. I assume that webtag is hard-wired to show when Cumulus was first engaged, and can't be overwritten.

-Tom

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sun 31 Mar 2013 8:30 am
by RayProudfoot
Why not just hard-code your start date and forget webtags?

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sun 31 Mar 2013 9:45 am
by Matt.j5b
Stop Cumulus and edit the Cumulus.ini file. Adjust the date in the line starting with "StartDate=". Save the file and restart Cumulus as per here: https://cumulus.hosiene.co.uk/viewtopic.php?f=4&t=9670

Re: Difficulty with Webtag <#DaysSince30Dec1899>

Posted: Sun 31 Mar 2013 1:29 pm
by krmidas
Matt.j5b wrote:Stop Cumulus and edit the Cumulus.ini file. Adjust the date in the line starting with "StartDate=". Save the file and restart Cumulus as per here: https://cumulus.hosiene.co.uk/viewtopic.php?f=4&t=9670
That should do it! Thanks.