× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dates and times are stored as binary values.
Date and time formats are only used to make this binary values readable!

SQL will convert a character string in a valid date format with a 4 digit
year (YYYY-MM-DD or MM/DD/YYYY or DD.MM.YYYY) or a time in a valid time
format (HH.MM.SS or HH:MM:SS or HH:MM AM/PM) into a real date or time!

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Mike Wills
Gesendet: Friday, 21. October 2011 17:56
An: midrange-l@xxxxxxxxxxxx
Betreff: Re: DDS Time vs. DDL Time

To add to the mystery, this works.

INSERT INTO TABLE
VALUES(1, 'A-9adb0cdf-2df1-4760-acb2-efc7ae8478bc', '626401',
'ABC123', 'PT ', 701, 35, 35,
'Mike Wills', 'Address', '', 'City', 'MN ', '123456 ',
'(123) 456-7890',
'me@xxxxxx', '10/19/2011', '15:21:47', '', 1)

--
Mike Wills
http://mikewills.me



On Thu, Oct 20, 2011 at 12:21 PM, Mike Wills <mike@xxxxxxxxxxxx> wrote:
I am working through an issue here. I have a C#.NET application that
is uploading data to the i. In one application, I have the file
defined as DDS (old habits don't die) with a time field. In this new
application, I am using DDL to create the file and it also has a time
field. I have basically copied and pasted the line from the working
application to the new application and still doesn't work. The only
difference I can see is DDS vs. DDL. Is anyone able to confirm there
is some sort of difference (even though I don't know why there wold
be)?

Working line:
cmd.Parameters.Add("@SUPERVISOR_SIGNED_TIME",
iDB2DbType.iDB2Time).Value =
leaveRequest.SupervisorSignedDateTime.ToString("HH.mm.ss");

Non-working line:
cmd.Parameters.Add("@PAYMENTTIME", iDB2DbType.iDB2Time).Value =
transactions.Transaction.TransactionTimestamp.ToString("HH.mm.ss");

Both leaveRequest.SupervisorSignedDateTime and
transactions.Transaction.TransactionTimestamp are of the same C# type
(DateTime).

The error is:
IBM.Data.DB2.iSeries.iDB2ConversionException was unhandled
Message=A conversion error occurred.
Source=IBM.Data.DB2.iSeries
MessageCode=111
MessageDetails=Parameter: 13.

I am first posting to MIDRANGE-L to eliminate the table out of the issue.

--
Mike Wills
http://mikewills.me


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.