Date Calulation

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 11242
interpreted = N
texte = Do the date calculations compensate for leap years? I assume that they do, but my formulas seem to be a few days off. The following formula should result in the day (0-6) of the first day of the month based on form fields of a month and a year: [format date %w][math]({[form.month]/1/[form.year]}-{01/01/1900})*86400[/math][/format]86400 is seconds per day.The tests for 1997:Month Real Calendar Formula Jan 3 0 Feb 6 3 Mar 6 3 April 2 6 May 4 1etc. Associated Messages, from the most recent to the oldest:

    
  1. Re: Date Calulation (Grant Hulbert 1997)
  2. Date Calulation (Dan Gilpin 1997)
Do the date calculations compensate for leap years? I assume that they do, but my formulas seem to be a few days off. The following formula should result in the day (0-6) of the first day of the month based on form fields of a month and a year: [format date %w][math]({[form.month]/1/[form.year]}-{01/01/1900})*86400[/math][/format]86400 is seconds per day.The tests for 1997:Month Real Calendar Formula Jan 3 0 Feb 6 3 Mar 6 3 April 2 6 May 4 1etc. Dan Gilpin

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Problems with [Applescript] (1997) Postprocessing CCs (2000) WCS Newbie question (1997) WebCommerce: Folder organization ? (1997) Cart questions (1997) 2nd try: possible to weight results of grouped fields search? (1998) Not really WebCat- (1997) Big Brother (just kidding, Ken) :) (2000) [shownext max=?] armed (1997) Sorting by date (1997) Search (1997) Extended [ConvertChars] (1997) Searching for all records (1998) WebCat2.0b15-to many nested [xx] tags (1997) WebStar 3 crackable !!!! (1998) Help name our technology! (1997) All questions are welcome on this list (1997) Credit Card Processing (2000) WebMerchant 1.6 and SHTML (1997) HomePage Caution (1997)