Max Wanadoo
max.wanadoo at gmail.com
Mon Mar 9 02:11:55 CDT 2009
> And thanks for the compliment Max! You're a pretty good artist yourself! I don't think so! Perhaps I could refer you to this quotation (in Latin) Nanos gigantum humeris insidentes Which translates as a Western metaphor meaning "One who develops future intellectual pursuits by understanding the research and works created by notable thinkers of the past" Now, that sounds more like me. Without the guys on this, and similar, lists I would still be Typing in the Listing of the Eliza program into my Commodore PET (oh, how I loved that PET - They even had one on Star Trek). It's you guys here (and I do mean the ladies as well) who take time and effort to bring your knowledge, and importantly your experience, to help others and I have learnt from that. My code is 99% perspiration (typing in other people's code) and 1% inspiration (hey! I can do that bit myself). And one thing I am not is artistic. If I had to live in a house drawn by me it would stand a pretty close facsimile of one drawn by a 5 year old with crayons. I can just about draw breath! Max Ps. Here is the wikepidia link: http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants pps I saw a Sirius (Peddle?) in a museum in Devon last week. I had one of them too. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 09 March 2009 04:40 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Figuring the date Of course Gustav is good. IMHO, development, and coding is both and art and a science. Because it is part science, there is plenty of room to claim something is faster, better, more accurate...etc. But the art part is where things are left to interpretation. However, AccessD is a great community of artists, and those looking for some help with the art! Sometimes artists let their ego get in the way <grin>, but I've always been impressed with the collection of talent on this list, it's one of the reasons I hang around! And thanks for the compliment Max! You're a pretty good artist yourself! Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Sunday, March 08, 2009 2:06 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Figuring the date Phew! You have to say, that Mr Gustav is good. Mind you, you yourself are up there with the luminaries. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 08 March 2009 19:00 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Figuring the date No argument on any count there! ;) I was just teasing, I just whipped up the example, wasn't going to for 100% optimization! ;) it was accurate though....for what was asked. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, March 07, 2009 5:35 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Figuring the date No! He is trying to do 100% accurate and that is laudable. Besides which he is going to buy me a beer! These are my principles. If you don't like them, I have others! Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 March 2009 21:36 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Figuring the date Picky picky... ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, March 07, 2009 4:12 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Figuring the date Hi Drew, the DateSerial geek Adding the count of days to the day parameter of DateSerial and not to the resulting date, it can be reduced to: Function MondayDate(intYear As Long, intWeek As Long) As Date MondayDate = DateSerial(intYear, 1, 1 + 7 - Weekday(DateSerial(intYear, 1, 1), vbTuesday) + 7 * (intWeek - 1)) End Function For everyone else: Note Drew's clever use of vbTuesday to turn Weekday into a kind of modulus function. If you would prefer vbMonday as the parameter in Weekday, you would have to use modulus or you would an additional week when Jan. 1 is the first day of the year: MondayDate = DateSerial(intYear, 1, (8 - Weekday(DateSerial(intYear, 1, 1), vbMonday)) Mod 7 + 1 + 7 * (intWeek - 1)) /gustav >>> DWUTKA at marlow.com 06-03-2009 23:46 >>> Function MondayDate(intYear As Long, intWeek As Long) MondayDate = DateSerial(intYear, 1, 1 + (7 - Weekday(DateSerial(intYear, 1, 1), vbTuesday))) + (7 * (intWeek - 1)) End Function Watch for word wrap there, the code inside that function should be all one line. It's the date of January 1st of whatever year, offset by when the first Monday is, the 7-Weekday bit, plus 7*one less then the number of weeks. So if you put MondayDate(2009,1), you'll get 1-5-2009, the first Monday of the year. MondayDate(2009,52) and you'll get 12-28-2009, the last Monday of the year. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jennifer Gross Sent: Friday, March 06, 2009 2:38 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Figuring the date Okay, I have answers to my questions - they define Week 1 as the first full week of the year and the week is defined as Monday to Sunday. Any thoughts on how to get that Monday date when I know the year and the week #? Jennifer -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jennifer Gross Sent: Friday, March 06, 2009 12:34 PM To: AccessD List Subject: [AccessD] Figuring the date Hey Everyone, I have two pieces of information - the year and the week # within the year, for instance 2008 13 is the 13th week in 2008. I have questions out to the client about how they define the week (Sun-Sat, Mon-Sun) and how the first week of the year is defined - week that January 1 falls in or first full week of the year. Anyway - what I need to do is create a function, unless one already exists, when fed these two pieces of information returns the Monday date (short date format) for that week. Any help is appreciated. Jennifer -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com