Hope one of you out there can help!
I have a date query to return all dates in 2 months time:
Month(DateAdd(" m",2,Date()) )
However this seems to be returning dates 2 months ahead for any year. Any ideas?
Also, how can I get the query to bring up overdue dates on the same report.
Any help would be very much appreciated on this topic.
Thanks
stu 6 2721
Stuart Masters previously wrote: Month(DateAdd(" m",2,Date()) )
This expression returns the month number (only) of the month that is two
months on from the current month.
Can you explain again what it is you want to get? And where you are
trying to get it.
Peter Russell
I currently have a date column in a table which has the date of next
assessment in it. I use this column in a query to bring up supposed
dates of assessments in two months time.
I would like the expression to work from a query so that, for example,
in the month of May someone who accessed this report based on the query,
would be given only the names of those people due for re-assessment in 2
months time (i.e., July).
Thanks for any help you can provide me with
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Stuart,
Create a calculated field in your query.
Example:
FilterDate:Form at([DateField], "mmyyyy")
For the criteria, try
Format(DateAdd( "m",2,Date( )), "mmyyyy")
This should get the year portion in as well as the month portion. If you
wish, you can uncheck the show box for this field so that it won't be
returned by the query, but just used to filter the results.
--
Wayne Morgan
MS Access MVP
"Stuart Masters" <st************ @pcs-tr.swest.nhs.uk > wrote in message
news:40******** *************@n ews.frii.net... I currently have a date column in a table which has the date of next assessment in it. I use this column in a query to bring up supposed dates of assessments in two months time.
I would like the expression to work from a query so that, for example, in the month of May someone who accessed this report based on the query, would be given only the names of those people due for re-assessment in 2 months time (i.e., July).
Thanks for any help you can provide me with
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Thanks Wayne works a charm. All I need now is to know how to bring up
overdue dates for the same year, i.e., <Now()(how does this work in the
criteria?)
Stu
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
<Now() will work as criteria for a date field. If the field is just a date
(no time) you could also use <Date(). To determine Over Due, I would need a
little more explanation. While you can see if today is past the Due Date,
you also need to check a field to see if the item was accomplished. Do you
want to know if it is still overdue or if it is overdue and was overdue when
accomplished. This will probably require setting criteria on more than one
field.
--
Wayne Morgan
MS Access MVP
"Stuart Masters" <st************ @pcs-tr.swest.nhs.uk > wrote in message
news:40******** *************@n ews.frii.net... Thanks Wayne works a charm. All I need now is to know how to bring up overdue dates for the same year, i.e., <Now()(how does this work in the criteria?)
Stu
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
Stuart Masters wrote: Thanks Wayne works a charm. All I need now is to know how to bring up overdue dates for the same year, i.e., <Now()(how does this work in the criteria?)
Stu
Do not use NOW() unless comparing dates AND times. If comparing dates
only, you Date or other date functions like Date(), DateSerial, DateAdd,
DateDiff, etc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Riley |
last post by:
The date fields being saved by a VB program were being saved
as #2003-11-22#. For reasons unknown to me these dates began
to be saved as "11/22/2003"
All of these dates were made dates with the "DateValue"
instruction and when used as input to Excel both formats
sort as dates but not intermingled. All "11/22/2003"
formated dates sort in date order but before the #2003/11/22#.
What would cause the format of these dates to change and what...
|
by: Alistair |
last post by:
diary_date = request.form("diary_date") - (from a populated drop down
list)
strSQL = "SELECT saz_title, saz_text from saz_details where saz_date =#" &
diary_date & "#"
a response.write gives
SELECT saz_title, saz_text from saz_details where saz_date =#07/06/2004#
|
by: PW |
last post by:
<rant>
Sorry guys, but I just have to whinge. Dates in ASP are a total pain in the
butt! I seem to get caught out so many times. I realise its my own fault,
but going from the posts in this newsgroup and others, I'm not the only one.
Its just a poorly addressed issue within ASP. So for all your poor buggers
out there that are having problems, particularly with european date formats,
here is my solution.
I have the user enter their...
|
by: Colin Steadman |
last post by:
I'm a stupid ASP programmer and I dont do Javascript (except for very
simple tasks anyway), and I'm in a bit of a predicament. I've used a
javascript table sorting script from here:
http://www.ipwebdesign.net/kaelisSpace/useful_tableSort.html
This works great except it doesn't sort my UK formatted dates
properly, and I end up with something like this:
Birth Date (dd/mm/yyyy)
|
by: Don Sealer |
last post by:
I have a report that includes 5 different subreports. I'd like to be
able to open this report using a date function (Start Date and End Date).
I'd like all five subreports to show the data from those dates. I have
learned how to use this start/end function but I can't figure out how to use
it with these subreports. Right now the report opens but asks for start/end
dates for each of the five reports. Is there a way I can input one set of...
| |
by: Rachel Suddeth |
last post by:
Is there a way to have the non-selectable dates (those before MinDate and
after MaxDate) draw differently so my users can see right away what dates
aren't allowed? I'm not seeing it...
Otherwise, anyone know of a cheap 3rd party calendar control I could use
that would provide that ability?
Thanks,
Rachel
|
by: Dixie |
last post by:
I am trying to calculate the number of workdays between two dates with
regards to holidays as well. I have used Arvin Meyer's code on the Access
Web, but as I am in Australia and my date format is dd/mm/yyyy, I have found
that the dates I put in my holidays table are reversed into American dates.
So, the wrong holiday dates are subtracted from the total workdays between
the start and end dates. Is there an easy fix for this?
******Code...
|
by: pitfour.ferguson |
last post by:
My dbase has the start date and end date of each visit. How can I ask
Access to list the day of the week of the start (easy), end (easy) and,
more importantly, the dates of the visit itself - ie list the dates
between the start and end date. Basically I am doing a day of the week
analysis and need to know which day of the week is busiest.
|
by: evilcowstare via AccessMonster.com |
last post by:
Hi, I have searched the forum for answers on this and to be honest as a
novice I find it a bit confusing so apologies if it is simple.
There are some searches that I want to apply to my database.
1. To search for all records between 2 dates and display them in a report
2. To be able to show all records which have a selection against them made
from a combo box
3. To be able to combine the two, selecting the option from a combo and then...
|
by: Jim Carlock |
last post by:
(1) Does PHP provide any way to handle dates prior to 1980?
I know there's problems with Microsoft Windows NT and all Windows
NT operating systems will allow a date prior to 1980 to be placed upon
a file, but it ends up not being able to display the date (probably an
Windows Explorer specific issue).
(2) I'm looking for for ways to store dates and process dates (dates only).
This probably ends up as a database specific issue, so I'm...
|
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: 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: 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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |