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?
Thanks
n8 6 6788
> 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
> 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
Thank you. That seemed to work. Can you point me to some reference
matrial so I can read up on the type of functions as described above?
Thanks again,
-N8
Thank you. That seemed to work. Can you point me to some reference
matrial so I can read up on the type of functions as described above?
Thanks again,
-N8
"N8tor" <n8******@gmail .com> skrev i en meddelelse
news:11******** **************@ z14g2000cwz.goo glegroups.com.. . Thank you. That seemed to work. Can you point me to some reference matrial so I can read up on the type of functions as described above?
Yes, F1 ;-)
--
/\ preben nielsen
\/\ pr**@post.tele. dk
"N8tor" <n8******@gmail .com> skrev i en meddelelse
news:11******** **************@ z14g2000cwz.goo glegroups.com.. . Thank you. That seemed to work. Can you point me to some reference matrial so I can read up on the type of functions as described above?
Yes, F1 ;-)
--
/\ preben nielsen
\/\ pr**@post.tele. dk This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt |
last post by:
My ASP page allows the user select the date, and it will display the report
during that week of that date.
My question is when the program query database, I need to know the beginning
date and ending date of that week.
Any ideas??
|
by: Mick White |
last post by:
According to the Safari browser the world began on "Fri Dec 13 1901
15:45:52 GMT-0500", but I need to be able to get around this limitation.
I am interested in dates from 1500 to 1901, as far as I can determine,
there are 14 possible calendar variations.
Year starts on Sun, Mon.....
Leap year starts on Sun, Mon..
I can label these early year "types" as a number between 0 and 13.
|
by: |
last post by:
I have a script...
-----
<SCRIPT language="JavaScript" type="text/javascript">
<!--
function makeArray() {
for (i = 0; i<makeArray.arguments.length; i++)
this = makeArray.arguments;
}
function makeArray0() {
|
by: Laguna |
last post by:
Hi Gurus,
I want to find the expiration date of stock options (3rd Friday of the
month) for an any give month and year. I have tried a few tricks with
the functions provided by the built-in module time, but the problem was
that the 9 element tuple need to be populated correctly. Can anyone
help me out on this one?
Thanks a bunch,
Laguna
|
by: AdityaK |
last post by:
Is there a way to find Weekend date for a given date using a DB2
query? I see that there are scalar functions such as DAY, DAYOFMONTH,
DAYOFWEEK,etc are available...but couldn't find one to get a weekend
date for any given date. Any information is appreciated.
Thanks,
Aditya.
| |
by: Craig Bates |
last post by:
Hi Guys
I have recently been learning SQL from a book whose examples used the
Oracle engine. I have now made an Access database containing
information for English Football fixtures. I am using ASP pages and
ADO to access and query this database for information.
One piece of information I want to retrieve is a list of all the
football fixtures for the current week - that is, all the fixtures
from the current day until the next Sunday -...
|
by: Jerry |
last post by:
Given a selected date, how do I find the date of the Sunday and Saturday of
the week that that date is in?
Thanks!
Jerry
|
by: Des |
last post by:
I have to do an events calender for a church. The events display will
be limited to that week. If someone went in today Wed 24th I want to
display 21st to 27th. I dont want any code samples, just the functions
that find the day of week and a function that can (in this case)
subtract 3 days to get sunday and add 7 for saterday. I can do the
rest.
Desmond.
|
by: Polaris |
last post by:
Hi Experts:
Using C#, knowing today's date, how to get the date of NEXT Tuesday?
For example, if today is 2007-04-26, I'd like to get the date of next
Tuesday which is 2007-05-01.
Thanks in advance!
Polaris
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |