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 2 6277
You can use the Weekday function which, by default, returns 1 for Sunday, 2
for Monday and so on up to 7 for Saturday. Knowing which day it is, you can
easily figure out how many days you need to subtract for the previous
Sunday, or add for the following Saturday.
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Jerry" <pl****@nospam. forme> wrote in message
news:cS******** ********@newsre ad3.news.atl.ea rthlink.net... 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
"Jerry" <pl****@nospam. forme> wrote in
news:cS******** ********@newsre ad3.news.atl.ea rthlink.net: 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
The format() function will return the day of week as a number 1 to
7 when given the "w" option. To get the saturday, use the dateadd()
function to increase the date by the number needed.
It's all in the help files.
--
Bob Quintal
PA is y I've altered my email address. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Eric Linders |
last post by:
Hello,
Today is Thursday, August 18, 2004. I would like to have a variable
that stores the date this coming Sunday (even if today happened to be
Sunday) in YYY-MM-DD format. I also need a variable that will store
the date this past Monday (even if today happens to be Monday) also in
YYY-MM-DD format.
So, the end result is that, for this week (today is 2004-08-18) I
would have the following two variables:
|
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: Jerry |
last post by:
Given a week number of a selected year, how do I find the dates of the
Sunday and Saturday of that week?
Thanks!
Jerry
|
by: Jerry |
last post by:
How do I find the dates of the Sunday and Saturday of a week if I have the
week number of a selected year?
Thanks!
Jerry
|
by: rock72 |
last post by:
Hello Everyone,
Can you tell me how to produce a query that when Login Date (entry) is
Sunday. First, check if the Sunday Date occur on 7th day of his duty.
Example 1:
Login Date no. of wk days Remark
11/01/04 1
| |
by: Drum2001 |
last post by:
Currently I am running the following query:
SELECT DateFilter.Employee, DateFilter.TimeTypeIn,
sectodur(IIf(Sum(DateDiff("s",,))-40*60*60>0,Sum(DateDiff("s",,))-40*60*60,0))
AS Overtime, DateAdd("d",-Weekday(),)+1 AS
WeekOf
FROM DateFilter
GROUP BY DateFilter.Employee, DateFilter.TimeTypeIn,
DateAdd("d",-Weekday(),)+1
HAVING (((DateFilter.TimeTypeIn)="Regular"));
|
by: griemer |
last post by:
Hi every one,
Is there a way to calculate the timestamp of 00:00:00 last Sunday. For
me, this is the begin of the current week..
Or, how old is this week, in seconds
Any ideas?
Regards,
|
by: RamananKalirajan |
last post by:
Can any one please help me out in calculating the no of weekdays between two givendays using Javascripts I tried in many way but I cant get the solution. The date format I am using is DD-MON-YYYY. Please help me out
|
by: pchaitanya |
last post by:
I have selected some list of valid dates to a label.
now i need to find first day among the given dates from label contrl
i got dates from calender control by clicking for entire week..
that is i have dates from sunday to saturday and I have to find which date is sunday......
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |