473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Counting days in date fields

46
I have to count the difference between two dates, to determine how many days exist between them. How do I do this? Can someone guide me to a good place please?

date from date to
2008-02-18 00:00:00 2008-02-29 00:00:00 - how do i count the number of
2008-03-01 00:00:00 2008-03-02 00:00:00 days in between?
2008-03-14 00:00:00 2008-03-16 00:00:00


thank you
Jun 26 '08 #1
1 3243
teneesh
46
found it!!!


datediff(day,datefrom, dateto)
Jun 26 '08 #2

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

Similar topics

6
by: Ike | last post by:
How can I make a query such that in the "WHERE" part of my clause, I want to put something to the effect that, say, X days have elapsed since a given date. For example, suppose in my table, I have...
7
by: Bambero | last post by:
Hello all Problem like in subject. There is no problem when I want to count days between two dates. Problem is when I want to count years becouse of leap years. For ex. between 2002-11-19...
6
by: edwardfredriks | last post by:
I'm looking for a script that, instead of counting down, can "count up" from a given date. So the output should be something like "(xx) days since (date/event)" or "(date/event) was (xx) days ago"....
2
by: David Mitchell | last post by:
I have tried using the following code to count the specific number of each weekday but get a compile error "User defined type not defined" which I think relates to the first line of the function: -...
14
by: jpr | last post by:
Friends, I have a form with four fields, date1, date2, date3 and date4. All these have all a mm/dd/yyyy format and have their source to a table. I need to add an unbound control (I will name...
21
by: jennwilson | last post by:
Ok - So, I am back. I would like to count the number of times a specific record appears in a field from one table in my query and then use that value in the same query to calculate an average....
2
by: jennyp29 | last post by:
Hi Can you help me with this problem? 1. I have two date fields, one a referral date and one an action date. I need to find out all those records that have a time span greater than 42 days...
11
by: WhiteShore | last post by:
hey there all.. i have a several questions about how to displaying date by counting on days.. i get the current date, and how to display date for: 1. end of this month 2. the 15th of next month...
2
by: vspsdca | last post by:
Hi, I'm quite new to the world of VBA so any help you could extend will help me a lot with my project. I have a database of Change Requests from our users. I have two date boxes, one is Date...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...

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.