Re: Date range
This WebDNA talk-list message is from 2006
It keeps the original formatting.
numero = 63857
interpreted = N
texte = Hey all,What's the best character to use in WebDNA for a not equal sign inside a [showif] when comparing two text variables?example: [showif [x] <> [y]] code if not equal [/showif]Thanks,sfbOn Friday, January 20, 2006, at 11:26 AM, WebDna @ Inkblot Media wrote:>> Someone else (Tana Adams I believe) was just (Jan 6th) having this same> issue. Matthew Bohne offered the following code:>> -------------------------->> Pseudo Code:>> //Grab the month and create a new variable called 'nextMonth'> [text]nextMonth=[math] [theMonth] + 1 [/math][/text]> [text]nextYear=[theYear][/text]>> //Test to see if nextMonth is greater than 12, if so reset it to 1 > (Jan) and> also add a year to nextYear [showif [nextMonth]>12]> [text][nextMonth]=1[/text]> [text][nextYear]=[math][theYear]+1[/math][/text]> [/showif]>> //Do your search> [search db=some.db&rnDatedatarq=[theMonth]/1/[theYear]> [nextMonth]/0/[nextYear]&Datetype=date]>>> This should grab everything within the range. Hope it helps.>> -Adam> ---------------------->> I have not personally tried it, but it appears to be sound. Give it > try and> let us know if this helps.>> Just another lowly WebDna Developer,> Ron Kirkland>>>> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of> Christophe Billiottet> Sent: Friday, January 20, 2006 7:56 AM> To: WebDNA Talk> Subject: Date range>> Hi everyone!>> we have a database with dates mm/dd/yy and we list results for> specific [month] and [year] like this:>> rnfecha_fact_comprdatarq=[month]/01/[year] [month]/31/[year]> &fecha_fact_comprtype=date>> I just noticed today that if [month]=11 and [year]=2005, then this> code sorts>> 11/01/05 to 12/01/05 INCLUDED (12/01/05 should be excluded)>> probably because there are only 30 days in November. My guess is> WebDNA recognizes "12/01/05" as "11/31/05".>> Is there another way to list results month by month without getting> this sort of behaviour?>> sincerely,> chris>> -------------------------------------------------------------> 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://webdna.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://webdna.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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hey all,What's the best character to use in WebDNA for a not equal sign inside a [showif] when comparing two text variables?example: [showif [x] <> [y]] code if not equal [/showif]Thanks,sfbOn Friday, January 20, 2006, at 11:26 AM, WebDna @ Inkblot Media wrote:>> Someone else (Tana Adams I believe) was just (Jan 6th) having this same> issue. Matthew Bohne offered the following code:>> -------------------------->> Pseudo Code:>> //Grab the month and create a new variable called 'nextMonth'> [text]nextMonth=[math] [theMonth] + 1 [/math][/text]> [text]nextYear=[theYear][/text]>> //Test to see if nextMonth is greater than 12, if so reset it to 1 > (Jan) and> also add a year to nextYear [showif [nextMonth]>12]> [text][nextMonth]=1[/text]> [text][nextYear]=[math][theYear]+1[/math][/text]> [/showif]>> //Do your search> [search db=some.db&rnDatedatarq=[theMonth]/1/[theYear]> [nextMonth]/0/[nextYear]&Datetype=date]>>> This should grab everything within the range. Hope it helps.>> -Adam> ---------------------->> I have not personally tried it, but it appears to be sound. Give it > try and> let us know if this helps.>> Just another lowly WebDna Developer,> Ron Kirkland>>>> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of> Christophe Billiottet> Sent: Friday, January 20, 2006 7:56 AM> To: WebDNA Talk> Subject: Date range>> Hi everyone!>> we have a database with dates mm/dd/yy and we list results for> specific [month] and [year] like this:>> rnfecha_fact_comprdatarq=[month]/01/[year] [month]/31/[year]> &fecha_fact_comprtype=date>> I just noticed today that if [month]=11 and [year]=2005, then this> code sorts>> 11/01/05 to 12/01/05 INCLUDED (12/01/05 should be excluded)>> probably because there are only 30 days in November. My guess is> WebDNA recognizes "12/01/05" as "11/31/05".>> Is there another way to list results month by month without getting> this sort of behaviour?>> sincerely,> chris>> -------------------------------------------------------------> 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://webdna.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://webdna.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://webdna.smithmicro.com/
sbraun
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:
[WebDNA] [OT] Google redirect or not (2014)
restart needed???? (1997)
Combining search criteria in a context? (1998)
Separate SSL Server (1997)
WebCat2b12 CGI Mac - [shownext] problem (1997)
California Tax Rates (1998)
Restart of DBserver (1997)
[input] [/input] (1997)
Search in 2 or more catalogs (1997)
[OT] JS snippet needed (2006)
Xserve Recommendations (2003)
special commerce fields (1997)
Security Hole - NetCloak Update (1998)
5.0 Preview Promotion Extension (2003)
Emailer setup (1997)
More news on 5.0 (2003)
[WebDNA] [tip] inodes (files in a directory) (2015)
WebCat2 - [format thousands] (1997)
WebCat2 - [include] tags (1997)
Kanji in http requests (1998)