o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

date difference -

hi all
i want to calculate time difference (in hr:mm:ss format) between 2 dates but i am getting unusual results. Can anybody help?
the code is

rsDoCheckOut.Fields(2) = Format(Time, "hh:mm:ss AMPM")
myTime = rsDoCheckOut.Fields(1) - rsDoCheckOut.Fields(2)

if rsDoCheckOut.Fields(2) is 4:50:30 PM and
rsDoCheckOut.Fields(1) is 4:45:30 PM then i am getting 12:5:00
Difference in minutes and seconds is perfect but hours ?
Please help!

 

Date difference, urgent please look -
hello everyone, I need a way of finding the date difference from two dates. The problem is as follows: I need to compare the "todays" date, whith a date field from a Ms access database, table called tblDate Now, if the difference between todays date and the one in the dat


Month Difference -
Hello everyone, I am developing a leave calculation programme, I need to calculate the difference between 2 different months. I my programme I have to compare only the months of the two dates. 1. date of joing 2. system date suppose the date of joining is 1-9-96 &


Sorry question is like this -
Thanks for the reply buddy but I have a date 12/12/2003 and time is 12:12:05 and now the date is 03/01/2004 and time is 09:01:03 i want the difference between these two that how many years, months, days, hours, minutes and seconds difference between the ending and starting date


Date Difference Commputing -
Please help Me! I'm Programmer beginner and I use VB6. Here is mine problem. I set following variables: Date1 - presenting current date in format "dd.mm.yyyy." Date2 - presenting end date also in format "dd.mm.yyyy." Date3 - presenting difference between current dat


How to calculate the difference between a range in Excel -
Hi All, refer to attached. how am i suppose to calculate the difference in the range that match to the date entered. let me explain how it works. Firstly you need to enter a date in "A22". Then key in the week at "A24" (eg.12). The date is changed to a


Oracle SQL: Difference between two dates in minutes -
I have a date field containing date and time. How do I calculate the difference in minutes between this date and sysdate? Thanks


XML/RSS last build into date variable -
Anyone have a simple way to put an XML/RSS <lastbuild> date into a standard date based variable. My issue is that there is no strict standard for the <lastbuild> date format, so I'd like to be able to use an API or built-in VB function to get a date/time that I can calc


compare time date -
Hi! (MS Access/ VBA) I've a report where the user input a date and time, and the report shows only the records after that date and time. I'm using the following query: DateDiff("n",CDate([forms]![myform]![fromdate] & " " & nz([forms]![myform]![fr


Date calculation problem -
Hi, I am using the following formula and expecting it to give me the difference in YEARS, but what I am getting instead is 8776. I don't know what it means. may be it is giving me the answer in days but I want in years. Is there a way to get the difference of 2 dates in years o


[2005] Today.date vs Now vs DateTime.Now -
Hi all, just want to know what is the difference between these date values? Once some one told me that its difference is server date and client date but not sure which one he meant. So, if you guys know, please kindly explain me about the below 3 types of date? And if you have links


DateDifference -
I am trying to get total date difference between two dates in crystal formula for example if i enter Date1 17/03/2006 Date 2 06/01/2005 The need the result should be like 1 year 2 months ...days etc., I used this formula for getting the difference in years But now i want th


How to calculate time difference -
Hello, For a project I am working on right now I need to be able to calculate the time difference between to given times (24 hour format) and two given dates For example: Case 1: On the same date The difference between 11:30 28/09/2005 and 14:45 28/09/2005 being 03:15 C


Date and DateTime -
As I looked on msdn I can’t figure it out what is the difference between the Date data type and DateTime. They both have the same constructors. If there is no difference, than why we have them both?


difference between 2 date -
Is there any function to give me the difference between 2 date for exam: dif beteen 05-24-2002 and 05-27-2002 = 3 days


how to get values of difference date from 2 datetime picker -
i have 2 date time picker (dtpk1 and dtpk2) i want to know how to compare date from 2 DateTimePicker and i want to know how how much day are difference ex: dateTimePicker1 : March/01/2006 dateTimePicker2 : March/05/2006 Textbox1 will show text: 4 (come from DateTimePicker 2


data difference -
I need to find the difference between a date entered in a form "txtDate" and the current date. If the person is less than 21 I need to pop up a message rejecting them and then redirecting them to a new page. Can anyone give me a bit of guidance on this. I am much more


Date difference question [2003] -
Hi, I'm trying to calculate the difference in the number of days, months, and years for any two given dates. I've tried the date.Subtract function, but it only returns a TimeSpan variable, which I haven't figured out how to display the data. It seems I can only output the total number


SQL Server overflow error -
I wrote a program in VB which executes a stored procedure on SQL Server (calculates a difference between two dates). From time to time I get an error message "Difference of two datetime columns caused overflow at runtime". I suspect that if an user by mistake enters a start d


Date "Difference" function WHAT -
Can this be done? I have information about a customer (name, address, DOB etc) which i store in an array Evertime time i save the customer details, i need something to tell me if the person is over 21 years of age...............is there any way to do this. I have done everythi


Is there a difference... -
Is there a difference between Date and DateTime? They both show time so I'm confused..


Getting Server Date -
How do I get the server date. When all the code is executed at the server side why doesn't date() function retrieve the server date. I had given something like this <%dt=date()%> in my code to get the server date. so dt has the server date here. Lemme know the difference pl


selecting date values using vb6 -
I'm attempting to use 2 masked edit boxes to input a date range (using the format dd/mm/yy) for searching an access database. my app generates a query similar to the one below: - select * from onsites where date >= #02/04/00# and date <= #30/04/00# order by date; (onsites


ASP Date Difference -
How do I find the difference between two dates in ASP? I have the two dates, lets say 7/23/2001 4:35:23 PM and 7/23/2001 4:45:23 PM. I want to be able to work out the difference in minutes of these two dates. How would I do this please?


Calendars and Date Formats -
Hi, I have created a calendar using the Calendar Control 11.0 option in the toolbox and have linked it to a text box in a user form. However, I cannot get the date to display in European format i.e. dd/mm/yy. When I am calculating the difference between 2 dates using the 'datediff'


[2005] Date Difference In Months -
I need the approximate difference between 2 dates in months. e.g. 31 July - 1 Jan = 5 months, 1 August - 1 Jan = 6 months Some people suggest using DateDiff to get the difference. Others advocate the use of the Timespan structure. However, Timespan doesn't appear to have a months


VB and Getting a difference between Dates -
Im having a major brain freeze on how I should go about doing this. I want to compare the current date and time to a date and time from a database. If the date and time from the DB is behind the current date and time by more then an hour I want to be able to take action with code Ala


FileDateTime Question -
Hi, I'm using filedatetime to get the created date of a file,i know it returns the modified date but in my case both are the same so it makes no difference. Anyway i didn't like the format it displayed it in when i used: --------------------------- FileDateTime(filepath) ------


Passing Date variable to SQL Query with Vb.NET -
Hi ! I'm using SQL query to update my SQL Server Database, via the ADO.NET RunCommand, and I was thinking about the best way to pass DateTime value in my Query. cause the date format are diffrrente between SQL and the computer. And I've come to this solution: Converting Date Value


Car Payment Calculation (Any IDEAS anybody) -
Hello, I have written a program to calculate a car payment using the following formula: r = r / 100 P ( r / 12 ) ------------------------- .....................-m (1 - ( 1 + r / 12 ) ) 'Please ignore the ... before -m now for the values given (r = 21.75 P = 6400


[2008] Compare dates and get value -
I've been messing around with this trying various methods, and none seem to return the desired results. What I'm trying to do is have a date stored in a text document, then the user comes along and (a few days later) clicks a button and that button needs to compare the stored date wit


Subtracing DateTimes -
G'day, I have two variables decleared as a date data type. they both contain a date and a time ie 04/11/03 6:24:23 AM. I want to determine the Number of Days, Hours, Minutes and Seconds until Date2, ie the difference between the two dates. i tried timetogo = date1 - date2 'all var


enddate -
I have the start date and end date and duration of a contract.... I know you use DateDiff to find the difference between to dates.... However I want to create a formula which calculates the end date using start date (which is now) and duration duration is the number of months


How to calculate difference between two times -
I am using VB from MS Access. I have two fields that are "Date" fields. I am using them to store times (a start time and an end time). I want to calculate the difference between the two times in hours. I have tried using DateDiff but I can't seem to get it to work. Curre


Time difference in hours -
How can I calculate the time difference in hours between two instances given by their date and time. For example difference between 23/11/2002 15:45 and 25/11/2002 23:15. This is urgent please help.


DATE problems - change date format to European, get current date, subtract 2 dates -
Need someone to point me in the right direction/start me off with this please as I am quite clueless on it at present... I need something that can successfully subtract two dates... eg. calculate the difference between the current date 02/04/04 (2nd April 04) and 29/03/04


Question about type casting. -
I guess this applies for both versions of VS (I use both 2003 and 2005). Can someone explain to me what the difference between the follow is? Dim a As String = DirectCast(Now.Date, String) Dim b As String = CStr(Now.Date) Dim c As String = CType(Now.Date, String) Dim d As Stri


calculate date/time difference -
hi everyone, how do i calculate the difference between #January 27, 1993 17:04:23# and #January 26, 1995 02:49:36# ? Which function should I use..? Many thanks in advance.


Date manipulation -
G'day, I need to calculate the following Mondays date whenever a user clicks on a button. I think my week starts on a Sunday if it makes any difference. Is there a simple way without a for/next loop? Peter


RESOLVED - DateDiff - Peculiar problem -
I have seen many postsd about getting the difference between two dates, specifically the number of days between 2 dates. Here is the code I have: Code: numDays = DateDiff(DateInterval.DayOfYear, dtpDate1.Value, dtpDate2.Value) When i am using future dates, it works fine. It


Dates !!! -
Hi, I am having problems in transferring dates to the Database. I am using a MaskEdBox for data entry. When i try to insert the date into the DataBase it throws me an error. I tried using the Cdate function to convert it into a date. Doesnt work. The other porblem ive been having i