home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,259 of 10,840   
   Rick Rothstein to All   
   Re: How do I find the date of this Satur   
   08 Mar 05 16:14:33   
   
   From: rickNOSPAMnews@NOSPAMcomcast.net   
      
   > I'm a programming neophyte so needless to say I need some help on some   
   > VB scripting.   
   >   
   > I need to create some code to find what month it will be this coming   
   > Saturday.  I also need to do the same for the week # of the month this   
   > Saturday.  And finally, the Year of the month this Saturday.   
   >   
   > Could someone help me with this?   
      
   You can calculate Saturday's date this way   
      
   SaturdaysDate = DateAdd("d", vbSaturday - Weekday(Date), Date)   
      
   Then use VB's Month and Year functions to get the month and year for   
   that date. To get the week number, you will need to use VB's DatePart   
   function. You can look these up in the help files to get more   
   information on them.   
      
   Rick - MVP   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca