473,503 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Returning a date based on date/time criteria

5 New Member
The start of the business day is 0700. However actual times are recorded. I would like to have a field that can round to a date based on actual date/time that is entered.

I.E. If the date/time falls between 6/1 0701 and 6/2 0700 the field would return 6/2. So if the actual date/time is 6/1 03:15 the date would be 6/1, if the actual date/time was 6/1 14:25 it would return 6/2.
Jun 4 '12 #1
2 1598
Rabbit
12,516 Recognized Expert Moderator MVP
Use the IIf() function to check the time and if it's after 0700 and before 1200, add a day.
Jun 5 '12 #2
NeoPa
32,557 Recognized Expert Moderator MVP
Take the DateValue() of the original value plus #16:59:59# (which is equivalent to a day minus #7:00:00# but with a second the other way to ensure 0700 itself is not rolled over).
Jun 5 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3577
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by...
4
5277
by: S. van Beek | last post by:
Dear reader, By a Date field with Now() as default value the content of the field is date plus time. As I need a filter in a query on date only (excluding time) I invented the following...
6
1667
by: Scott | last post by:
I have a start date and an end date in my project that is defaulted to the current date at run-time using the following code... Date1.Value = Now() Date2.Value = Now() I then have some code...
0
1516
by: kumarkanth | last post by:
My question is how do I manipulate the procedure to calculate cut-off date with in working days and it should skip weekends and holidays? I have holiday table to determine holidays Table Name :...
13
29282
by: Killer42 | last post by:
Hi all. Hopefully a simple one for any SQL guru. In an Access query, how can I group by a date field, without having my data broken down by time? In other words, I just want a count per day, not...
2
2550
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received...
3
1863
by: wish | last post by:
Dear all; Can someone guide me how to code out the javascript to calculate the estimate date based on the user selected date and the how long the duration in term of week. eg. 19/9/2007 is...
9
4123
by: trogenone | last post by:
Hello Im new to this and need a hand. Sorry if i have posted this in the wrong area. I am working on a small database it consists of two tables: Employees & Holidays Employees field are: ...
10
3993
by: WebCM | last post by:
There is a function: http://paste.ubuntu.com/21865 It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There is one...
4
48430
by: jtgarrison | last post by:
I apologize in advance if this has been asked for or if I'm missing somithing obvious, but I have a form that I want to auto populate the week beginning and week ending date based on the current...
0
7087
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...
0
7462
tracyyun
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...
0
5579
agi2029
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,...
1
5014
isladogs
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...
0
4675
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...
0
3168
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...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
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 ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.