Re: Date subtraction
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 44252
interpreted = N
texte = I should mention that another clean way to do the days of month problem is to create a database with the month and the days of month. Then use [date %m] to lookup the days of month.>Yes, that's what I was asking.>>Thanks mucho, John>>>-Will>>>On Sunday, October 20, 2002, at 04:47 PM, John Hill wrote:>>> Are you asking how to get the days in the current month? If so:>>>> [math]({[date %m/1/%y]}+{1/0/0000})-{[date %m/1/%y]}[/math]>>>> I didn't test to see if I made a mistake, but you get the idea. (note there's no need to subtract 1).>>>> John.>>>>> I reckon so.. ;)>>>>>> Rainy weekend here tho'>>>>>> While we're at it, the formula I was working on was to extrapolate the sales in a given month based on the sales so far like so:>>>>>> At the current rate, the sales this month will be: [math]([totalordervalue]*[days_in_month])/({[date]-[startdate]})[/ math]>>>>>> Which for today would look like:>>>>>> [math] (25500*31)/18[/math]>>>>>> Assuming our sales to date in October are $25500. Any spiffy way have [days_in_month] equal the days in the current month?>>>>>> Thanks a million,>>>>>> -Will>>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:46 PM, Alain Russell wrote:>>>>>>> Must have been a hint from somewhere to not be working on the weekend ..>>>> What do you reckon ..>>>>>>>>> Ah, yes>>>>>>>>>> That was it>>>>>>>>>> Thanks Alain...>>>>>>>>>> !>>>>>>>>>> -Will>>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:39 PM, Alain Russell wrote:>>>>>>>>>>> Do you have your prefs set correctly .. ?>>>>>> I get 19 when I switch the dates to match my preferences ..>>>>>>>>>>>>> Oh, and that'd be WebCat 4.5.0 on MacOSXS 10.2.1>>>>>>>>>>>>>> -Will>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:32 PM, NovaDerm Skincare Science>>>>>>> wrote:>>>>>>>>>>>>>>> Well, dang, that's what I thought too.>>>>>>>>>>>>>>>> But>>>>>>>>>>>>>>>>>>>>>>>>> [math]{10/20/2002}-{10/01/2002}[/math]>>>>>>>>>>>>>>>>>> Alain>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Gives me 182>>>>>>>>>>>>>>>>>>>>>>>> ???>>>>>>>>>>>>>>>> -Will>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>>>> This message is sent to you because you are subscribed to>>>>>>>> the mailing list
.>>>>>>>> To unsubscribe, E-mail to: >>>>>>>> To switch to the DIGEST mode, E-mail to>>>>>>>> >>>>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>>> This message is sent to you because you are subscribed to>>>>>>> the mailing list .>>>>>>> To unsubscribe, E-mail to: >>>>>>> To switch to the DIGEST mode, E-mail to>>>>>>> >>>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>>> >>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> To switch to the DIGEST mode, E-mail to>>>>> >>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>> ------------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> Web Archive of this list is at: http://search.smithmicro.com/>>>> -- >> --------------------------------->> John A. Hill>> Oak Hill Software>> Website Development/Consulting>> john@oakhillsoftware.com>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> Web Archive of this list is at: http://search.smithmicro.com/>>>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/-- --------------------------------- John A. Hill Oak Hill SoftwareWebsite Development/Consulting john@oakhillsoftware.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I should mention that another clean way to do the days of month problem is to create a database with the month and the days of month. Then use [date %m] to lookup the days of month.>Yes, that's what I was asking.>>Thanks mucho, John>>>-Will>>>On Sunday, October 20, 2002, at 04:47 PM, John Hill wrote:>>> Are you asking how to get the days in the current month? If so:>>>> [math]({[date %m/1/%y]}+{1/0/0000})-{[date %m/1/%y]}[/math]>>>> I didn't test to see if I made a mistake, but you get the idea. (note there's no need to subtract 1).>>>> John.>>>>> I reckon so.. ;)>>>>>> Rainy weekend here tho'>>>>>> While we're at it, the formula I was working on was to extrapolate the sales in a given month based on the sales so far like so:>>>>>> At the current rate, the sales this month will be: [math]([totalordervalue]*[days_in_month])/({[date]-[startdate]})[/ math]>>>>>> Which for today would look like:>>>>>> [math] (25500*31)/18[/math]>>>>>> Assuming our sales to date in October are $25500. Any spiffy way have [days_in_month] equal the days in the current month?>>>>>> Thanks a million,>>>>>> -Will>>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:46 PM, Alain Russell wrote:>>>>>>> Must have been a hint from somewhere to not be working on the weekend ..>>>> What do you reckon ..>>>>>>>>> Ah, yes>>>>>>>>>> That was it>>>>>>>>>> Thanks Alain...>>>>>>>>>> !>>>>>>>>>> -Will>>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:39 PM, Alain Russell wrote:>>>>>>>>>>> Do you have your prefs set correctly .. ?>>>>>> I get 19 when I switch the dates to match my preferences ..>>>>>>>>>>>>> Oh, and that'd be WebCat 4.5.0 on MacOSXS 10.2.1>>>>>>>>>>>>>> -Will>>>>>>>>>>>>>> On Saturday, October 19, 2002, at 07:32 PM, NovaDerm Skincare Science>>>>>>> wrote:>>>>>>>>>>>>>>> Well, dang, that's what I thought too.>>>>>>>>>>>>>>>> But>>>>>>>>>>>>>>>>>>>>>>>>> [math]{10/20/2002}-{10/01/2002}[/math]>>>>>>>>>>>>>>>>>> Alain>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Gives me 182>>>>>>>>>>>>>>>>>>>>>>>> ???>>>>>>>>>>>>>>>> -Will>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>>>> This message is sent to you because you are subscribed to>>>>>>>> the mailing list .>>>>>>>> To unsubscribe, E-mail to: >>>>>>>> To switch to the DIGEST mode, E-mail to>>>>>>>> >>>>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>>> This message is sent to you because you are subscribed to>>>>>>> the mailing list .>>>>>>> To unsubscribe, E-mail to: >>>>>>> To switch to the DIGEST mode, E-mail to>>>>>>> >>>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>>> This message is sent to you because you are subscribed to>>>>>> the mailing list .>>>>>> To unsubscribe, E-mail to: >>>>>> To switch to the DIGEST mode, E-mail to>>>>>> >>>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>>>> This message is sent to you because you are subscribed to>>>>> the mailing list .>>>>> To unsubscribe, E-mail to: >>>>> To switch to the DIGEST mode, E-mail to>>>>> >>>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>> ------------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> To switch to the DIGEST mode, E-mail to >>>> Web Archive of this list is at: http://search.smithmicro.com/>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> Web Archive of this list is at: http://search.smithmicro.com/>>>> -- >> --------------------------------->> John A. Hill>> Oak Hill Software>> Website Development/Consulting>> john@oakhillsoftware.com>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> Web Archive of this list is at: http://search.smithmicro.com/>>>>>------------------------------------------------------------->This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/-- --------------------------------- John A. Hill Oak Hill SoftwareWebsite Development/Consulting john@oakhillsoftware.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
John Hill
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:
Not really WebCat (1997)
Review comparison by PC Magazine: Open for On-line Business (1997)
Re:listfiles-looking for slick solution (1997)
[WriteFile] problems (1997)
Extra equals signs with IE? (More debugging questions...) (1997)
Revisit: speed test (2002)
[WebDNA] fastcgi 7+ & [cart]? (2010)
What am I doing wrong? (2000)
[click][/click] (1999)
[WebDNA] encrypt files/directories (2011)
Renumbering Database Records (1999)
[WebDNA] Getting to know ARRAY (2014)
comparison to Lasso 6 or 7 (2004)
can WC render sites out? (1997)
Date Question (2002)
Error & Problem (1997)
Math with Time (1997)
Configuring E-mail (1997)
Feature Request/Rant - Last-modified and Expires MIME (2000)
RE: Help name our technology! (1997)