[AccessD] Date difference

Arthur Fuller artful at rogers.com
Fri Jul 11 13:50:15 CDT 2003


IMO this is a UI-perception problem not a db problem. DateTimes are recorded
serially, therefore there is no issue at the db level about whether date A
precedes date B. Thus this is entirely a UI issue. Depends on what you
present and what the users think your presentation means. For example, I
tell my users to enter the dateTime before their first selection, i.e.
2003-07-31. That way I can skip the time element.
 
The difference between July 1 and July 5 is never 5 days, according to my
calculations.
 
Ultimately the point here is that you should be able to compare any two
dates and derive a duration exrpressed in seconds. Then you can format it
any way you want to describe the number of days, hours, minutes and seconds.
 
hth,
Arthur
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ray Li
Sent: July 11, 2003 1:26 PM
To: AccessD at databaseadvisors. Com
Subject: [AccessD] Date difference



If we find the date difference between two dates using datediff function, it
may end up an inaccurate difference.  For example, the start date is 1 July,
2003 and the end date is 5 July, 2003.  The difference is 5 days.  The
answer may be right or wrong.  If the start date is 1 July 2003 00:00 and
the end date is 6 July 2003 00:00.  The accurate answer should be 3-5 days.
If we ask the staff to record the time of start date and end date, human
delay and error may happen too unless there is an aid of time recorder.  I
would like to know the general perception of this issue.

 

Thanks,

 

Ray 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030711/b8cd53bb/attachment-0001.html>


More information about the AccessD mailing list