473,809 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having problems with Timestampdiff

The sql
select TIMESTAMPDIFF(1 ,CHAR(TIMESTAMP ('2001-09-29-11.25.42.483219 ') -
TIMESTAMP('2001-09-26-12.07.58.065497 '))) from sysibm.sysdummy 1
works in db2 8.1.2/RHEL 2.1
but gives the error
DB2 SQL error: SQLCODE: -443, SQLSTATE: 38552, SQLERRMC:
SYSFUN.TIMESTAM PDIFF;TIMESTAMP DIFF;SYSFUN:03
on db2 8.2/RHEL 3

Any pointers?
Regards
Shishir

Nov 12 '05 #1
1 12131
Shishir wrote:
The sql
select TIMESTAMPDIFF(1 ,CHAR(TIMESTAMP ('2001-09-29-11.25.42.483219 ') -
TIMESTAMP('2001-09-26-12.07.58.065497 '))) from sysibm.sysdummy 1
works in db2 8.1.2/RHEL 2.1
but gives the error
DB2 SQL error: SQLCODE: -443, SQLSTATE: 38552, SQLERRMC:
SYSFUN.TIMESTAM PDIFF;TIMESTAMP DIFF;SYSFUN:03
on db2 8.2/RHEL 3

Any pointers?
Regards
Shishir


Function TIMESTAMPDIFF returns an INTEGER (signed INTEGER) representing number
of units (units selected by value of first argument) in the Timestamp Duration
represented by second argument.

In your case first argument is 1 - which represents microseconds, second
argument is timestamp duration of 2231744.417722 seconds.
Convertion of this duration to microseconds and storing result into an INTEGER
is impossible.

Jan M. Nelken

Nov 12 '05 #2

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

Similar topics

1
1823
by: paul | last post by:
Hi everyone, I'm having problems displaying a date in the correct format and I was wondering if anyone knew how to help. I'm using pear to extract a date from our back end database (the date is in DATE_FORMAT_ISO_EXTENDED), and I was to display the date in "Wednesday, February 23rd 2005, 11:04" format. I'm using something like:
0
2440
by: George | last post by:
I have two tables and want to find the Maximum date for a given GIN. I have been able to produce the result in Sybase but I am having problems in Oracle. Example of my query in Sybase. create table #temp1 ( groupcode char(10), loc_acc_no int, gin int,
8
1732
by: Michael C | last post by:
Hi all, I'm still having problems with VS.NET 2003 running on my XP machine. I finally decided I might as well uninstall completely and reinstall from scratch. But lo and behold it won't let me uninstall... It gets stuck about 2/3rds of the way through the uninstall (based on the progress bar) and hangs for a very, very long time (a few hours last time). Then it seems to give up and returns an error message stating that it cannot...
4
1619
by: Charles | last post by:
I am still having problems with sessions crossing over from other sessions. What I mean by this is that Mary may get just some or all of Renae’s information. I think that what is going on with this problem is the way that I have the solution setup I have this .NET CEmployees class that I am storing into a session object. The sessions are stored using SQL Server. I also have this ActiveX DLL file created in VB6. The ActiveX DLL file has...
11
1490
by: Rick Mogstad | last post by:
I know this is probably not the group for this, but i know that these groups are fairly active, and that the people are usually willing to help. Is anyone else experiencing this? The news server is responding VERY SLOW for me. it takes about 10 minutes to download 150 text messages. All other news servers are working fine for me, its only the microsoft news server.
7
1802
by: Ron | last post by:
Hi All, It's taking a long, LONG time for me to see a post from here (and other NGs too, for that matter--which is why I think it may be me...). Sometimes it takes 2-3 minutes after clicking the post for me to be able to read it. And sometimes, it never comes up..instead I get "Message is no longer available on the server". Also, like right now, it's almost 9:30am and most recent post I can see was sent at about 2am.
2
1739
by: l46kok | last post by:
Hello. This is the first time I'm encountering vectors and I'm having problems. I want to create a vector filled with objects, but as soon as I try to invoke a function within the object, I get an error message stating "Vector out of subscript range". And I'm using
1
2780
by: tshad | last post by:
Some of my regular expressions don't seem to work correctly in IE7. I am on asp.net 1.1. I have a site that has been up for a while and I started having problems on machines with IE7. IE5 and IE6 seem to work fine. In the following - 919-111-2222 as well as (919)111-2222 was giving one of my clients the error message and IsValidate was set to false. <asp:RegularExpressionValidator runat="server"
3
1610
by: i80and | last post by:
I'm working on a basic web spider, and I'm having problems with the urlparser. This is the effected function: ------------------------------ def FindLinks(Website): WebsiteLen = len(Website)+1 CurrentLink = '' i = 0 SpliceStart = 0 SpliceEnd = 0
4
2109
by: chris | last post by:
Hello all, I am having problems getting Apache 2.2.4 to read the php_mysqli.dll file some my C:\php\ext\ directory. The following is the error that Apache displays in the error log: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php/ext/ php_mysqli.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 The file is in the directory, but Apache won't load the file.
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10633
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...
1
10375
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9198
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6880
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
5548
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...
1
4331
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
3860
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
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.