473,473 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Timediff() and negative results

Ike
timediff('2006-03-08 22:38:42','2006-03-09 08:47:03') = -13:51:39

How can I make it not output negative numbers when the days increase? -Ike
Mar 26 '06 #1
1 4257
"Ike" <rx*@hotmail.com> wrote in message
news:8s******************@newsread3.news.atl.earth link.net...
timediff('2006-03-08 22:38:42','2006-03-09 08:47:03') = -13:51:39

How can I make it not output negative numbers when the days increase? -Ike


There are a bunch of non-useful answers to this question. Such as, "put a
minus sign in front of it" or "put the argument with the greater value
first".

But these don't address the requirement you have. No one can answer this
question for you, because we don't know why you need the values to be
positive, or what value you're looking for.

For instance, one could come up with an expression that strips off the date
portion, and compares only the time portion. But does that give you
information that is useful to your application? I can't tell. And it still
doesn't prevent negative values.

Regards,
Bill K.
Mar 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: pj | last post by:
Why does M$ Query Analyzer display all numbers as positive, no matter whether they are truly positive or negative ? I am having to cast each column to varchar to find out if there are any...
3
by: Dan | last post by:
Hello, Am trying to construct a query that'll both compute elapsed time based on certain criteria and sum this up for a subset of records. Sample Data that I'm working with: Row Ev_Time ...
4
by: Darryl Kerkeslager | last post by:
I'm trying to construct a simple query (Hah! then why can't I figure it out if it's so simple?) that totals the results where the drug test results are True, negative being treated like any other...
6
by: chrisdebritain | last post by:
Hello, I am trying to construct a query to be run against a timestamp so that data is displayed from a certain time backwards. For example: SELECT Time_Stamp, Park_Name, Mill_Name, Size,...
8
by: Jerim79 | last post by:
I am working on a script that will query a database for a FNAME/LNAME combo. If it finds the combo, I need it to do one set of instructions. If it doesn't find it, I need it to do something else....
3
by: bsm2th | last post by:
In mysql, this statement gives a negative answer, meaning the start is a later time than the end. This won't work in C, because the hour variable is unsigned. Does anyone know of another way to tell...
35
by: Martin Wells | last post by:
Plain char may be signed or unsigned. Typical ranges could be: CHAR_MIN == -128, CHAR_MAX == 127 CHAR_MIN == 0, CHAR_MAX == 255 The Standard says that the behaviour is undefined if we...
19
by: brendanmcdonagh | last post by:
Hi, Does anyone know how to display differences between 2 times from 2 different dtpicker displaying results in HH:mm rather than just h or n? I am designing a project for friend so she can enter...
1
by: santoshsri | last post by:
Hi All, My C# web application calls a webservice to process a report. It sends XMLs as parameter and in response gets an XML node which stores Binay datatype bin.base64. It makes an instance of...
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,...
1
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
bsmnconsultancy
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...

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.