473,799 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ 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 4281
"Ike" <rx*@hotmail.co m> wrote in message
news:8s******** **********@news read3.news.atl. earthlink.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
8226
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 negative numbers being hidden from me :( I tried checking Tools/Options/Connections/Use Regional Settings both on and off, stopping and restarting M$ Query Analyer in betwixt, but no improvement.
3
3010
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 Ev_id Ev_Desc ------------------------------------------------------------------- 1 2004-12-03 14:28:45 400 Batch set Run
4
1447
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 result. However, instead of giving only the count of the True results for each result, I'm getting the count of the tests, regardless of result: a person taking three drug tests, all negative, will display: offender_id off_name ...
6
22282
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, Email_Type FROM emails WHERE TIMEDIFF(NOW(),Time_Stamp) <= '96:00:00' ORDER BY Time_Stamp LIMIT 0, 30 This would theoretically pull all the records from this moment until 4
8
1398
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. What I can't figure out is what variable to check against. Here is what I have for the relevant part of the script: $connection = mysql_connect($hostname, $username, $password); mysql_select_db($databasename) or die ("Cannot connect to database"...
3
2055
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 whether or not a time comes before another time.. Thanks Bob The statement I used was SELECT TIMEDIFF('01:00:00','02:00:00');
35
4562
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 pass an argument to the "to*" functions whose value is outside the range of 0 through UCHAR_MAX. This most certainly should have been CHAR_MIN through CHAR_MAX.
19
3622
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 her start, end, and lunch time in order to calculate total weekly hours worked. I did have a text box input way of doing until i realised that half an hour was 0.70! Any way of rescuing that way of doing it sounds good. E.g, I have 15:00...
1
7781
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 the proxy class of webservice and makes a synchronous call to webservice GetReport() op. Here is the code snippet - *************************************************************************************** wbFELIP.wsZProcessReport.ProcessReport...
0
10488
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10029
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
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 we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.