Re: Auto entering Friday's date in a field

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 44513
interpreted = N
texte = Thanks, this is the right definition. I finally figured this out. This is based off of 00/06/0000 is a friday. so in: [FORMAT days_to_date][MATH]{[DATE]} + (6 - {[DATE]}%7)[/MATH][/FORMAT] first you take the date mod 7. this gives you a remainder 1-6. If you subtract this from friday or 6 it gives you the days to next friday.However, this might not be a soluiton for the original poster if he wanted the following friday always because if it happens to be friday, it will give you that same days result.(I don't really hate chris :-)DonovanP.S., I still don't know exactly why this works because I don't know how one ends up with the days till friday. NovaDerm Skincare Science wrote:> Modulo is the *whole* number remainder of a division. > > So 10 mod 5 = 0, because 10/5=2 with remainder 0 > > but 11 mod 5 = 1, because 11/5=2 with a remainder of 1 > > and 11 mod 6 = 0, because there is no *whole* number remainder > > Thus 6 mod 7 = 0, because there is no whole number remainder (6/7 > results in a fraction) > > It's kinda like division without decimals... > > -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/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Auto entering Friday's date in a field (Pat Visone 2002)
  2. Re: Auto entering Friday's date in a field (Donovan Brooke 2002)
  3. Re: Auto entering Friday's date in a field (NovaDerm Skincare Science 2002)
  4. Re: Auto entering Friday's date in a field (Gyuri 2002)
  5. Re: Auto entering Friday's date in a field (Kenneth Grome 2002)
  6. Re: Auto entering Friday's date in a field (NovaDerm Skincare Science 2002)
  7. Re: Auto entering Friday's date in a field (Donovan 2002)
  8. Re: Auto entering Friday's date in a field (Michael Davis 2002)
  9. Re: Auto entering Friday's date in a field (NovaDerm Skincare Science 2002)
  10. Re: Auto entering Friday's date in a field (Michael Davis 2002)
  11. Re: Auto entering Friday's date in a field (Clint Davis 2002)
  12. Re: Auto entering Friday's date in a field (Donovan 2002)
  13. Re: Auto entering Friday's date in a field (Michael Davis 2002)
  14. Re: Auto entering Friday's date in a field (Chris List Recipient 2002)
  15. Re: Auto entering Friday's date in a field (Matthew Bohne 2002)
  16. Re: Auto entering Friday's date in a field (Dan Strong 2002)
  17. Re: Auto entering Friday's date in a field (Michael Davis 2002)
  18. Re: Auto entering Friday's date in a field (Chris List Recipient 2002)
  19. Re: Auto entering Friday's date in a field (Donovan 2002)
  20. Re: Auto entering Friday's date in a field (Donovan 2002)
  21. Re: Auto entering Friday's date in a field (Chris List Recipient 2002)
  22. Re: Auto entering Friday's date in a field (Michael Davis 2002)
  23. Re: Auto entering Friday's date in a field (Donovan 2002)
  24. Re: Auto entering Friday's date in a field (Matthew Bohne 2002)
  25. Re: Auto entering Friday's date in a field (Clint Davis 2002)
  26. Re: Auto entering Friday's date in a field (Alex McCombie 2002)
  27. Re: Auto entering Friday's date in a field (Dan Strong 2002)
  28. Auto entering Friday's date in a field (Pat Visone 2002)
Thanks, this is the right definition. I finally figured this out. This is based off of 00/06/0000 is a friday. so in: [FORMAT days_to_date][math]{[date]} + (6 - {[date]}%7)[/MATH][/FORMAT] first you take the date mod 7. this gives you a remainder 1-6. If you subtract this from friday or 6 it gives you the days to next friday.However, this might not be a soluiton for the original poster if he wanted the following friday always because if it happens to be friday, it will give you that same days result.(I don't really hate chris :-)DonovanP.S., I still don't know exactly why this works because I don't know how one ends up with the days till friday. NovaDerm Skincare Science wrote:> Modulo is the *whole* number remainder of a division. > > So 10 mod 5 = 0, because 10/5=2 with remainder 0 > > but 11 mod 5 = 1, because 11/5=2 with a remainder of 1 > > and 11 mod 6 = 0, because there is no *whole* number remainder > > Thus 6 mod 7 = 0, because there is no whole number remainder (6/7 > results in a fraction) > > It's kinda like division without decimals... > > -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/ Donovan Brooke

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 WebCat-Plugin () PCS Frames (1997) Re:quit command on NT (1997) problem: mail changed (1997) Here's how to kill a Butler Database. (1997) New Command prefs ... (1997) RE: Emailer Set Up (1997) Off topic: to Jeroen (bouncing email) (2000) Odd [math] behavior (2003) Public beta 2 for WebCatalog 4.0 is now available. (2000) select multiple (1997) New iMac, now ... how do I make webdna serve .html files? (2005) format_to_days on NT (1997) Re:Variable Math (1998) [WebDNA] Stop hacking (2013) too many nested [xxx] (1997) Webcatalog server support (1997) Shopping cart problem (2003) Extended [ConvertChars] (1997) RE: Signal Raised (1997)