473,466 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DateDiff Help Needed

4 New Member
Hey Gang ... I'm sure this question has been asked and answered numerous times (although I'll be damned if I've been able to find it). I've read some of the other posts on this site, but none of them seemed to mimick my requirement.

Like several other people, I was working in excel and entered a formula that would calculate the difference between entered dates. When I converted this file over to a Table in MS-Access it didn't like that formula.

I then happened across the DateDiff function and it seemed to worked very well. However I was only able to get it to work on an MS-Access Page. Not really a big problem because I thought it should be relatively easy to transfer this data back to my Table.

So far I haven't been able to come across a way of doing this.

Is this possible and relatively painless ?

Thanks for your help.
Apr 7 '08 #1
4 1112
Stang02GT
1,208 Recognized Expert Top Contributor
Hey Gang ... I'm sure this question has been asked and answered numerous times (although I'll be damned if I've been able to find it). I've read some of the other posts on this site, but none of them seemed to mimick my requirement.

Like several other people, I was working in excel and entered a formula that would calculate the difference between entered dates. When I converted this file over to a Table in MS-Access it didn't like that formula.

I then happened across the DateDiff function and it seemed to worked very well. However I was only able to get it to work on an MS-Access Page. Not really a big problem because I thought it should be relatively easy to transfer this data back to my Table.

So far I haven't been able to come across a way of doing this.

Is this possible and relatively painless ?

Thanks for your help.
are you importing your excel sheets as tables in access?
Apr 8 '08 #2
maze03079
4 New Member
are you importing your excel sheets as tables in access?
I'm asked if I want to store my data into a New Table or into an Existing Table.

If there are other options available ... I don't see them.
Apr 8 '08 #3
Stang02GT
1,208 Recognized Expert Top Contributor
I'm asked if I want to store my data into a New Table or into an Existing Table.

If there are other options available ... I don't see them.
Import them and create a new table.
Apr 8 '08 #4
maze03079
4 New Member
Import them and create a new table.

That's where Access tells me it doesn't like my excel formulas because after everything is said and done, the cells that 'had' the formulas in them are now just the answers of the equation.

For example I have in my cells the following formula to calculate the number of days between a 'start' and 'stop' date:
=IF(A13>0,(INT(A13-A12)+1+(MOD((A13-A12),1)>0.25)*1+(-1)),"")

A12 = 06/29/07
A13 = 07/10/07

After importing this into Access it's simply the answer to the equation which is 11

But whereas I want to transition this database from excel to access I'd like access to calculate this for me within the table. Or if I have to calculate this on a Page then is it possible to report this number back to the table ?
Apr 8 '08 #5

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

Similar topics

8
by: inamori | last post by:
I face that problems 07/01/2003 06/30/2006 ---------> it should be 3 01/01/2003 02/28/2005 --------->could i get 2 years and 2 months 01/01/2003 03/01/2005 ...
1
by: intl04 | last post by:
I'm trying to set up a query that will include a new field ('Days until completion') whose value is derived from the DateDiff function. I think I have the syntax correct but am not sure. Days...
4
by: Paolo | last post by:
I am having some problem with a Year Function. I have form on which I have 4 field which indicate dates and an additional form which sums those dates: These are the fields: YEARS...
7
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using...
5
by: sr | last post by:
Anyone know of a better way to simulate a datediff for C#, i.e., without referencing the VB.NET runtime? Only added the functionality that was needed for me so it is not the full implementation...
6
by: kevinjwilson | last post by:
I am trying to get the date difference between two dates but I don't want the function to include weekends in the calculation. Does anyone have an idea on how to make this work?
3
by: Dinesh | last post by:
Hi Experts, I am working on SSRS 2005, and I am facing a problem in counting the no of days. My database has many fields but here I am using only two fields They are Placement_Date and...
2
by: ankitmathur | last post by:
Hi Friends, I have been trying to use this query to get all records that will expire within the next 30 days from the current date. While I am getting records with the same query what is...
14
by: cmdolcet69 | last post by:
I'm trying to use the DateDiff function to calculate the difference whether a shift has been setup. when i run the code below with strFirstShiftEnd as a stringor date or datetime. I get an error...
6
by: Wheeler2008 | last post by:
Hi All, I am currently running a query on a MS Access table, in which I want to be able to compare and total the difference in dates between records. I only have one date field within the table. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
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...
1
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...
0
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
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,...
0
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.