Re: Date Help
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 56419
interpreted = N
texte = 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 on731948. You need to format the days to date to get back to dd/mm/yyyy afteryou 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 AMSubject: 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 wantto> return the timesheet records a given user for the current month. Therecords> 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 anyfunny> 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/
Associated Messages, from the most recent to the oldest:
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 on731948. You need to format the days to date to get back to dd/mm/yyyy afteryou 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 AMSubject: 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 wantto> return the timesheet records a given user for the current month. Therecords> 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 anyfunny> 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/
"WebDna @ Inkblot Media"
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:
verify email address (1998)
credit card (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
A Global Variable (1997)
Multiple Stores and WebCatalog Prefs (1997)
The Form authentication trick (2000)
Extended [ConvertChars] (1997)
Database (2002)
WebCat2b15MacPlugin - showing [math] (1997)
[FEATURE REQUEST] (2004)
process SSI (1998)
Windows 2.1b2 Append Bug? (1997)
Updating a database once per day - An example (1998)
[WebDNA] macOS 10.13.3 and WebDNA Mac Server 8.5.1 - hick-up (2019)
how to check for no value while using [URL] to prevent cr (1999)
New command suggestion (1997)
RE: Jimmy Houssen (1998)
Looking for a Manual (1997)
WebCat2 - many [carts] on one template page? (1997)
[Shownext] (1997)