Dököll 2,364
Recognized Expert Top Contributor
Greetings and salutations!
Ran a quick search here a found this: http://www.thescripts.com/forum/thre...inus+date.html Though it is very helpful when dealing with dates alone, I cannot tweak it to fit my demands.
I decided to try it in query:
The idea is to look two fields through a query (TodayTime and TodayDate), and change my dates to previous date, according to Time, and the time must be specific, > than 3:30 PM, while minusing the week-ends:
The query is not ready yet, will post in a bit.
Any help you can provide is surely appreciated:-)
7 1706 Dököll 2,364
Recognized Expert Top Contributor
Greetings and salutations!
Ran a quick search here a found this: http://www.thescripts.com/forum/thre...inus+date.html Though it is very helpful when dealing with dates alone, I cannot tweak it to fit my demands.
I decided to try it in query:
The idea is to look two fields through a query (TodayTime and TodayDate), and change my dates to previous date, according to Time, and the time must be specific, > than 3:30 PM, while minusing the week-ends:
The query is not ready yet, will post in a bit.
Any help you can provide is surely appreciated:-)
Now the query works just fine: -
-
SELECT ThisTableData.TodayDate, ThisTableData.TodayTime, DateAdd("d",-1,[ThisTableData.TodayTime]) AS DateOO
-
FROM ThisTableData
-
WHERE (((ThisTableData.TodayDate) Between #9/1/2007# And Now()) AND ((ThisTableData.TodayTime) Not Like "*AM*") AND ((DateAdd("d",-1,[ThisTableData.TodayTime])) Not Like "*12:*"));
-
-
TodayTime hold the time I need to fool around with, as mentioned above. My problem now is figuring out how to disregard 12 Noon Through 3:29 PM hours:
Works, but when I plug in:
Access thinks I mean 1:0 1:00 PM
What do you make of it?
What happens if you use 24 hour time instead of the 12 hour variety? i.e. 13:00 instead of 1:00pm...
Regards,
Scott
Dököll 2,364
Recognized Expert Top Contributor
Thanks much, Scott, I did not think of of that:-)
Have a good week!
Dököll 2,364
Recognized Expert Top Contributor
What happens if you use 24 hour time instead of the 12 hour variety? i.e. 13:00 instead of 1:00pm...
Regards,
Scott
Actually, Scott, I almost forgot my manners. You are recent Mod, correct! I do not believe to have welcomed you, Welcome!!!
Dököll
FishVal 2,653
Recognized Expert Specialist
Hi, Dokol.
So, why not to use Hour() function?
Actually, Scott, I almost forgot my manners. You are recent Mod, correct! I do not believe to have welcomed you, Welcome!!!
Dököll
Thanks, Dokoll! I'm getting adjusted to this new level of responsibility :-)
The 24 hour format will not work, obviously, if you are comparing against existing data that is contained in 12 hour format. In which case, using the Hour() function may be the best way to go.
Regards,
Scott
Dököll 2,364
Recognized Expert Top Contributor
Hi, Dokol.
So, why not to use Hour() function?
Great minds think alike. I was coming over to report it not working. In I attempted to convert to 13:00 it did not like. I also still have Now(), rather than Time(), in my table for the TodayTime field. I must have kept it there because it gave me the time anyway through the form. Will try your examples:-)
take care good buddies, and thanks!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: androtech |
last post by:
Hello,
I'm looking for a function that returns a date range for a specified week
number of the year.
I'm not able to find functions like this anywhere. Any pointers/help would
be much appreciated.
TIA
|
by: David |
last post by:
Hi,
I have an ASP app running via our MySQL server.
On one of my .asp pages I have an sql string as follows:
.......WHERE ShipDate >= curdate()-7
This worked great up until the end of yesterday pulling up all records
from last week (Todays date minus 7 days). Now we are in October, for
some reason, this has stopped working, so my page...
|
by: Luis |
last post by:
I've adapted the following code so that it prints the date in
DD/MM/YYYY format. However it prints the incorrect date! If todays
date is 01/01/2003 it prints 03/01/2003 - 3 days out! What have I done
wrong?
<script language="Javascript">
aCalendar = new Date();
CalendarDay = aCalendar.getDay();
CalendarMonth = aCalendar.getMonth();
|
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...
|
by: Richard Cornford |
last post by:
For the last couple of months I have been trying to get the next round
of updates to the FAQ underway and been being thwarted by a heavy
workload (the project I am working on has to be finished an QA tested
for a new year release. I don't think that going to prove practical, but
there is no harm in trying :) and some serious family...
| |
by: Wayne |
last post by:
Hi all
I'm trying to calculate the number of days (or workdays) between 2 given
dates that do not include weekend days or public holidays
(public holidays are user defined from a dbase, have a start date & an end
date & may span a weekend)
If a start date (workday) & an end date (workday) are on the same day then
the number of workdays...
|
by: shsandeep |
last post by:
I used the following query to retrieve the date in dd-mon-yyyy format.
db2 => SELECT RTRIM(CHAR(DAY(COVG_TYP_STRT_DT))) || '-' ||
RTRIM(MONTHNAME(COVG_TYP_STRT_DT)) || '-' ||
RTRIM(CHAR(YEAR(COVG_TYP_STRT_DT))) FROM twd_coverage_type
1...
|
by: user |
last post by:
Hi,
Let's say I have 2 dates in the b/m format:
Date 1 and date 2
How do I check whether Date2 is later than Date 1?
Date1. 21-Nov-2006 09:00:00 PM
|
by: CDMAPoster |
last post by:
In:
http://groups.google.com/group/comp.databases.ms-access/msg/f06bd4c45037ef29
Lyle wrote:
:Terry Kreft wrote:
:
:>Suck it and See?
:
|
by: Amzul |
last post by:
hello all
i am breaking my head over this and there isnt any good solution that i have saw til now, my problam is that i want to tell the date of a sertin day what was choosen
<select id="7_day" name ="7days">
<option value="0">Sunday</option>
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |