Re: Date Help
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 56422
interpreted = N
texte = Thanks for the replies on this so far but still no joy. If I just use one ofthe date bits then I get a correct answer, it's just when I do both that theproblem happens.With this particular example I get nothing returned at all with both partsof the expression and a correct answer if I just use one of them.Any other ideas?CheersSteveOn 27/2/04 4:33 pm, "WebDna @ Inkblot Media"
wrote:> I did not see this get an answer, so I will toss in my findings.> > It appears to me that you are storing dates as dd/mm/yyyy but search on> 731948. You need to format the days to date to get back to dd/mm/yyyy after> you do the math to add a month. Or use the math directly in the search.> > [math date]SDate={01/[date %m]/[date %Y]}[/math]> [text]SDate=[Format Days_To_Date %d/%m/%y][SDate][/Format][/text]> [math date]EDate={01/[date %m]/[date %Y]}+{00/01/0000}[/math]> [text]EDate=[Format Days_To_Date %d/%m/%y][EDate][/Format][/text]> > - or -> > [search db=admin/-Timesheets.db&> eqTSUserNamedatarq=[USERNAME]&> geTSDATEdatarq=[math date]{01/[date %m]/[date %Y]}[/math] &> lsTSDATEdatarq=[math date]{01/[date %m]/[date %Y]}+{00/01/0000}[/math]&> asTSDATEsort=1&> TSDATEtype=date]> > I hope this helps.> > ----- Original Message -----> From: "Steve Craig" > To: "WebDNA Talk" > Sent: Friday, February 27, 2004 6:55 AM> Subject: Date Help> > >> Hi>> >> OK, I am officially going off my head. I have re-used a piece of otherwise>> working code and it's not working and I cannot see why. Basically I want> to>> return the timesheet records a given user for the current month. The> records>> have a field called TSDATE which is in dd/mm/yyyy (UK Format). I know I>> could save these as numbers but would prefer to work in this format.>> >> (I have put a return in after each & in the search string to save any> funny>> returns from the email.)>> >> [math date]SDate={01/[date %m]/[date %Y]}[/math] -> 01/02/2004>> [math date]EDate={01/[date %m]/[date %Y]}+{00/01/0000}[/math] -> 01/03/2004>> >> [search db=admin/-Timesheets.db&>> eqTSUserNamedatarq=[USERNAME]&>> geTSDATEdatarq=[SDate]&>> lsTSDATEdatarq=[EDate]&>> asTSDATEsort=1&>> TSDATEtype=date]>> >> >> Any help much appreciated, I'm sure its something silly. This code is just>> returning all records for that user.>> >> Cheers>> >> Steve Craig>> >> >> >> ------------------------------------------------------------->> 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:
Thanks for the replies on this so far but still no joy. If I just use one ofthe date bits then I get a correct answer, it's just when I do both that theproblem happens.With this particular example I get nothing returned at all with both partsof the expression and a correct answer if I just use one of them.Any other ideas?CheersSteveOn 27/2/04 4:33 pm, "WebDna @ Inkblot Media" wrote:> I did not see this get an answer, so I will toss in my findings.> > It appears to me that you are storing dates as dd/mm/yyyy but search on> 731948. You need to format the days to date to get back to dd/mm/yyyy after> you do the math to add a month. Or use the math directly in the search.> > [math date]SDate={01/[date %m]/[date %Y]}[/math]> [text]SDate=[Format Days_To_Date %d/%m/%y][SDate][/Format][/text]> [math date]EDate={01/[date %m]/[date %Y]}+{00/01/0000}[/math]> [text]EDate=[Format Days_To_Date %d/%m/%y][EDate][/Format][/text]> > - or -> > [search db=admin/-Timesheets.db&> eqTSUserNamedatarq=[username]&> geTSDATEdatarq=[math date]{01/[date %m]/[date %Y]}[/math] &> lsTSDATEdatarq=[math date]{01/[date %m]/[date %Y]}+{00/01/0000}[/math]&> asTSDATEsort=1&> TSDATEtype=date]> > I hope this helps.> > ----- Original Message -----> From: "Steve Craig" > To: "WebDNA Talk" > Sent: Friday, February 27, 2004 6:55 AM> Subject: Date Help> > >> Hi>> >> OK, I am officially going off my head. I have re-used a piece of otherwise>> working code and it's not working and I cannot see why. Basically I want> to>> return the timesheet records a given user for the current month. The> records>> have a field called TSDATE which is in dd/mm/yyyy (UK Format). I know I>> could save these as numbers but would prefer to work in this format.>> >> (I have put a return in after each & in the search string to save any> funny>> returns from the email.)>> >> [math date]SDate={01/[date %m]/[date %Y]}[/math] -> 01/02/2004>> [math date]EDate={01/[date %m]/[date %Y]}+{00/01/0000}[/math] -> 01/03/2004>> >> [search db=admin/-Timesheets.db&>> eqTSUserNamedatarq=[username]&>> geTSDATEdatarq=[SDate]&>> lsTSDATEdatarq=[EDate]&>> asTSDATEsort=1&>> TSDATEtype=date]>> >> >> Any help much appreciated, I'm sure its something silly. This code is just>> returning all records for that user.>> >> Cheers>> >> Steve Craig>> >> >> >> ------------------------------------------------------------->> 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/
Steve Craig
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:
More questions about serial number dishing (1997)
fieldsumm quandary (2001)
[OT] Imagemagick (2004)
Image maps/Webcat (1997)
I have observed and I am gone. (1998)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
What file? (1997)
is sku a REQUIRED field on NT (1997)
Re:Emailer and encryption (1997)
Solve the Problem, get the code! (2001)
New Guestbook Source (1997)
PayPal WebMerchant Templates (2006)
SendNews (1999)
Ampersand (1997)
Search results templates (1996)
Combining search criteria in a context? (1998)
Problems with [Search] param - Mac Plugin b15 (1997)
bannerads example idiot (1997)
Template Encryption (1998)
Loosing Quantity (2000)