ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60
25-Jan-04 19:05 21:10 125
25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day..
I just can't make the minutes add up..
Appreciate any help....
Thanks 8 1908
You should look into the datediff function in help. It will ease your mind.
There are others as well like dateadd and datepart. You will have to
consolidate your date and time into one field though.
--
Jerry Boone
Analytical Technologies, Inc. http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message
news:b7******** *************** ***@posting.goo gle.com... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up..
Appreciate any help....
Thanks
DateDiff will give you the difference between two date times in minutes or
other units. Your problem, of course, is that you only have one date to go
with the time... so you need to determine if the second time represents a
new day. That can be easy or difficult, depending on the range of times.
If the difference is never more than a few hours, it'll be relatively easy.
If, however, you can start at 3PM one day and stop at 8PM the next, it will
be not only difficult, but impossible unless you supply the second date.
Calculate the minutes in a query, use Running Total on the field in the
Report.
Larry Linson
Microsoft Access MVP
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message
news:b7******** *************** ***@posting.goo gle.com... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up..
Appreciate any help....
Thanks
try
TodayDate = "1/19/04"
TodayTIME = "08:00"
ToMORROWDate = "1/20/04"
ToMORROWTIME = "13:00"
MyDate01 = todaydate & " " & todaytime & " AM"
MyDate02 = toMORROWdate & " " & toMORROWtime & " PM"
datediff(. . . .. .
John Bickmore www.BicycleCam.com www.Feed-Zone.com
"Larry Linson" <bo*****@localh ost.not> wrote in message
news:k7******** *********@nwrdd c03.gnilink.net ... DateDiff will give you the difference between two date times in minutes or other units. Your problem, of course, is that you only have one date to go with the time... so you need to determine if the second time represents a new day. That can be easy or difficult, depending on the range of times.
If the difference is never more than a few hours, it'll be relatively
easy. If, however, you can start at 3PM one day and stop at 8PM the next, it
will be not only difficult, but impossible unless you supply the second date.
Calculate the minutes in a query, use Running Total on the field in the Report.
Larry Linson Microsoft Access MVP
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message news:b7******** *************** ***@posting.goo gle.com... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up..
Appreciate any help....
Thanks
Sure, works fine if you know that the 13:00 time is tomorrow; but with only
one date, it could as well be today.
Larry Linson
Microsoft Access MVP
"xzzy" <mr********@com cast.net> wrote in message
news:FoYOb.8578 9$sv6.203765@at tbi_s52... try
TodayDate = "1/19/04" TodayTIME = "08:00"
ToMORROWDate = "1/20/04" ToMORROWTIME = "13:00"
MyDate01 = todaydate & " " & todaytime & " AM"
MyDate02 = toMORROWdate & " " & toMORROWtime & " PM"
datediff(. . . .. .
John Bickmore www.BicycleCam.com www.Feed-Zone.com "Larry Linson" <bo*****@localh ost.not> wrote in message news:k7******** *********@nwrdd c03.gnilink.net ... DateDiff will give you the difference between two date times in minutes
or other units. Your problem, of course, is that you only have one date to
go with the time... so you need to determine if the second time represents
a new day. That can be easy or difficult, depending on the range of times.
If the difference is never more than a few hours, it'll be relatively easy. If, however, you can start at 3PM one day and stop at 8PM the next, it will be not only difficult, but impossible unless you supply the second date.
Calculate the minutes in a query, use Running Total on the field in the Report.
Larry Linson Microsoft Access MVP
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message news:b7******** *************** ***@posting.goo gle.com... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up..
Appreciate any help....
Thanks
ge****@yas1.fre eserve.co.uk (Alex) wrote in message news:<b7******* *************** ****@posting.go ogle.com>... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up..
You need to use DateDiff("n",[TimeStart],[TimeEnd]). Also, you should
store the date AND time in the same field as a general date mm-dd-yyyy
hh:nn:ss or whatever format you want. Also, see this article.
So your You would have something like this:
TimeStart TimeEnd Minutes
25-jan-04 15:00 25-jan-04 16:00 60
25-jan-04 23:00 26-jan-04 04:00 300
(Don't store the date as a separate field - make it part of the both
the TimeStart and the TimeEnd date/time fields, and format each as
general date, and you shouldn't have any more problems.
HTH,
Pieter http://www.mvps.org/access/datetime/date0008.htm
There are others there... look up "Midnight" on the search page...
Larry Linson wrote: Sure, works fine if you know that the 13:00 time is tomorrow; but with only one date, it could as well be today.
One suggestion, in this day and age of gigabyte hard drives, is to not act
stingy on diskspace and to add a datefield for the end time and enter the date.
That would end it. An even simpler method is to use NOW() values for start and
end instead of Date() in one field and Time() in another.He could make that mod
to the table easy enough and with an update query change the fields to NOW()
values. With the FORMAT() function, he can easily display dates and times.
Of course, the person could do a check and verify if the TO Time is less than or
greater than the FROM time. If less than, then add a day to the start date.
Since this calc is probably doing with employee work hours or delivery times,
the range in hours is most likely less than 24. Simply more overhead.
In this case, the developer that initiated the post needs to plan better on the
data he stores.....IMHO
Larry Linson Microsoft Access MVP
"xzzy" <mr********@com cast.net> wrote in message news:FoYOb.8578 9$sv6.203765@at tbi_s52... try
TodayDate = "1/19/04" TodayTIME = "08:00"
ToMORROWDate = "1/20/04" ToMORROWTIME = "13:00"
MyDate01 = todaydate & " " & todaytime & " AM"
MyDate02 = toMORROWdate & " " & toMORROWtime & " PM"
datediff(. . . .. .
John Bickmore www.BicycleCam.com www.Feed-Zone.com "Larry Linson" <bo*****@localh ost.not> wrote in message news:k7******** *********@nwrdd c03.gnilink.net ... DateDiff will give you the difference between two date times in minutes or other units. Your problem, of course, is that you only have one date to go with the time... so you need to determine if the second time represents a new day. That can be easy or difficult, depending on the range of times.
If the difference is never more than a few hours, it'll be relatively easy. If, however, you can start at 3PM one day and stop at 8PM the next, it will be not only difficult, but impossible unless you supply the second date.
Calculate the minutes in a query, use Running Total on the field in the Report.
Larry Linson Microsoft Access MVP
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message news:b7******** *************** ***@posting.goo gle.com... > ACC 2000 > > I am having problems working out how to adding up minutes? > > > Example:using short time > > Date Timestart Timend Minutes > > 25-jan-04 15:00 16:00 60 > 25-Jan-04 19:05 21:10 125 > 25-Jan-04 23:00 04:00 Can't make it work!! > > The problem is when it trips over into a new day.. > I just can't make the minutes add up.. > > > Appreciate any help.... > > > Thanks
You are correct: that would, no doubt about it, be a more efficient way to
store and handle the data. It may not be a more efficient way to have
someone enter the data, though. Also, the data may come from some other
software, or be captured from inputs to some other software. Even so, it
might be worthwhile to convert it to true date/time values after it is input
or captured. On the other hand, if it comes from other software or is
captured from that input stream, getting the date that corresponds to the
second time may not be an option.
Larry Linson
Microsoft Access MVP
"Salad" <oi*@vinegar.co m> wrote in message
news:40******** *******@vinegar .com... Larry Linson wrote:
Sure, works fine if you know that the 13:00 time is tomorrow; but with
only one date, it could as well be today. One suggestion, in this day and age of gigabyte hard drives, is to not act stingy on diskspace and to add a datefield for the end time and enter the
date. That would end it. An even simpler method is to use NOW() values for
start and end instead of Date() in one field and Time() in another.He could make
that mod to the table easy enough and with an update query change the fields to
NOW() values. With the FORMAT() function, he can easily display dates and
times. Of course, the person could do a check and verify if the TO Time is less
than or greater than the FROM time. If less than, then add a day to the start
date. Since this calc is probably doing with employee work hours or delivery
times, the range in hours is most likely less than 24. Simply more overhead.
In this case, the developer that initiated the post needs to plan better
on the data he stores.....IMHO Larry Linson Microsoft Access MVP
"xzzy" <mr********@com cast.net> wrote in message news:FoYOb.8578 9$sv6.203765@at tbi_s52... try
TodayDate = "1/19/04" TodayTIME = "08:00"
ToMORROWDate = "1/20/04" ToMORROWTIME = "13:00"
MyDate01 = todaydate & " " & todaytime & " AM"
MyDate02 = toMORROWdate & " " & toMORROWtime & " PM"
datediff(. . . .. .
John Bickmore www.BicycleCam.com www.Feed-Zone.com "Larry Linson" <bo*****@localh ost.not> wrote in message news:k7******** *********@nwrdd c03.gnilink.net ... > DateDiff will give you the difference between two date times in
minutes or > other units. Your problem, of course, is that you only have one date
to go > with the time... so you need to determine if the second time
represents a > new day. That can be easy or difficult, depending on the range of
times. > > If the difference is never more than a few hours, it'll be
relatively easy. > If, however, you can start at 3PM one day and stop at 8PM the next,
it will > be not only difficult, but impossible unless you supply the second
date. > > Calculate the minutes in a query, use Running Total on the field in
the > Report. > > Larry Linson > Microsoft Access MVP > > "Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message > news:b7******** *************** ***@posting.goo gle.com... > > ACC 2000 > > > > I am having problems working out how to adding up minutes? > > > > > > Example:using short time > > > > Date Timestart Timend Minutes > > > > 25-jan-04 15:00 16:00 60 > > 25-Jan-04 19:05 21:10 125 > > 25-Jan-04 23:00 04:00 Can't make it work!! > > > > The problem is when it trips over into a new day.. > > I just can't make the minutes add up.. > > > > > > Appreciate any help.... > > > > > > Thanks > >
Days too late, but what about
DateDiff("n",(C str(EventDate) & " " & Cstr(TimeStart) ),(Cstr(EventDa te) & "
" & Cstr(TimeEnd)))
Clive
"Alex" <ge****@yas1.fr eeserve.co.uk> wrote in message
news:b7******** *************** ***@posting.goo gle.com... ACC 2000
I am having problems working out how to adding up minutes?
Example:using short time
Date Timestart Timend Minutes
25-jan-04 15:00 16:00 60 25-Jan-04 19:05 21:10 125 25-Jan-04 23:00 04:00 Can't make it work!!
The problem is when it trips over into a new day.. I just can't make the minutes add up.. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jason |
last post by:
I'm tearing out my hair here: ACCESS 2000:
When I attempt to overwrite a date in my date field with a new user selected
valid date eg: 05/23/99
my date field changes to the TIME I updated the field
and does not display my desired date: 05/23/99
Instead it reads: 12:12:03 AM
I am going nuts - even considering converting the field to text. The field
|
by: David |
last post by:
Hello.
I have a string with some time in it, for example "13:59".
How can I get how many minutes is in it?
Like this: "1:30" contains 90 minute.
Can anybody show me some example?
Tank you.
|
by: jlee |
last post by:
I'm pretty much a newbie on mysql, and I need some help.
I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4
(i386) on a server hosting an active website.
The site's developer uses his own php shopping cart to receive customer
orders.
The configuration was done via cPanel with no external modifications -
which produced no protests when built, ran and connected with no
|
by: Randall Parker |
last post by:
I'm using this:
MyDateTimeStr = MyDateTimeVal.ToString("MM-dd-yyyy hh:mm:ss tt");
in C# to convert what I read from a form submit.
What I want is something more flexible where the minutes and seconds are optional.
How to do that?
I want to able to specify several variations as all legal:
6-30-2005 4pm
|
by: Bill |
last post by:
My computer is a client in the central timezone with daylight savings.
I need to pass a time and a value to the server via webservices (for example, the price of electricity at each hour in the future). Suppose I want to send these four times and values to the server:
2006-10-29 05:30 GMT, $1.50
2006-10-29 06:30 GMT, $1.60
2006-10-29 07:30 GMT, $1.23
2006-10-29 08:30 GMT, $1.35
Since my computer is in the central timezone, there is no...
| |
by: Bill |
last post by:
(Sorry if this is a duplicate post. I'm not sure if my newsreader was set up
right.)
---------------------------------
My computer is a client in the central timezone with daylight savings.
I need to pass a time and a value to the server via webservices (for
example, the price of electricity at each hour in the future). Suppose I
want to send these four times and values to the server:
2006-10-29 05:30 GMT, $1.50
2006-10-29 06:30 GMT,...
|
by: Yammi |
last post by:
Ok, I know that there is a very smart programmer out there that can resovle my issue.
I am trying to calculate time worked by 15 minute intervals.
Example:
=================
Emp 1 started work at 13:00:00 and worked 183 minutes
Emp 2 started work at 17:15:00 and worked 150 minutes
Emp 3 started work at 08:30:00 and worked 17 minutes
|
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: 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
|
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...
| |