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 of00/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 itgives you the days to next friday.However, this might not be a soluiton for theoriginal poster if he wanted the following fridayalways because if it happens to be friday, it willgive you that same days result.(I don't really hate chris :-)DonovanP.S., I still don't know exactly why this works becauseI 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:
Thanks, this is the right definition.I finally figured this out. This is based off of00/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 itgives you the days to next friday.However, this might not be a soluiton for theoriginal poster if he wanted the following fridayalways because if it happens to be friday, it willgive you that same days result.(I don't really hate chris :-)DonovanP.S., I still don't know exactly why this works becauseI 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:
WebCat2: Master Counter snippet (1997)
[ShowNext] (1997)
DNABill Screen Shots (2003)
Three new problems ... (1997)
Smart caching problems with 2.1b3? (1997)
WebCatalog can't find database (1997)
WebCat2 - [format thousands] (1997)
Assigning new CART number (1997)
Migrating to NT (1997)
Enhancement Request for WebCatalog-NT (1996)
2.0Beta Command Ref (can't find this instruction) (1997)
[OT] Mac WebCat 3 for IIS (2000)
Errant Email. (1998)
Suffix Mapping (1997)
Generate a SKU (1998)
3RD POST Character limit in [Search]? (1998)
Bug? (1997)
Server IP address? (1998)
with Link i need to (1997)
[protect] on NT? (1997)