|
|
Choosing A Webhost: |
RE: TIMESTAMP/DATE Format & INSERT: msg#00013db.maxdb
Hello Kevin, The ODBC driver (and the JDBC driver too) do not modify any strings or parameters. IIRC, the result of Now() in VB isn't a string, but a DateTime value, which is a VB-internal representation of a time stamp, which is then handled by VB/MSADO so that it works with the ODBC format. (Take also care that what you see a string represen- tation depends on your local - I'm quite sure with a German windows you see DD.MM.YYYY HH:MM (in 24h format).). For Java I can only suggest using a java.text.SimpleDateFormat instance that is setup for your format, and create Date object by using the dateformat's parse method. (and use later 'setDate' method for setting that parameter). Regards Alexander Schröder SAP DB, SAP Labs Berlin -----Original Message----- From: Kevin Wilson [mailto:Kevin.Wilson@xxxxxxxxxxx] Sent: Freitag, 1. April 2005 19:18 To: Zabach, Elke; Andreas Goldstein; maxdb@xxxxxxxxxxxxxxx Subject: RE: TIMESTAMP/DATE Format & INSERT The biggest problem I have is with the jdbc driver and how it (doesn't) handle implied date format conversions. For instance, if you use the Now() function in VB it spits out a timestamp value in the format of "MM/DD/YYYY HH:MM AM/PM" and when assigned to a timestamp field the ODBC driver handles the interpretation/conversion easily but using that same format with the jdbc driver causes an error. I am not sure if it the MSADO library or the MaxDB-ODBC driver that is reworking the datetime to fit the target format but it sure would be nice if the jdbc driver could do the same. -----Original Message----- From: Zabach, Elke [mailto:elke.zabach@xxxxxxx] Sent: Friday, April 01, 2005 12:51 AM To: Andreas Goldstein; maxdb@xxxxxxxxxxxxxxx Subject: AW: TIMESTAMP/DATE Format & INSERT Andreas Goldstein wrote: > > I am porting a database from Access to MaxDB. From the Access-DB I have > made > a SQL-Dump that contains about 800 dates with a date in it. The date- > format > in the dump-fil is "DD.MM.YYYY HH:MM:SS". > > I am now trying to insert these lines into the MaxDB-DB by using the > SQL-Studio. > > For example the following codes demonstrates what I am trying to do: > CREATE TABLE aaa ( > id FIXED(10) DEFAULT SERIAL, > sent TIMESTAMP, > PRIMARY KEY (id)) > // > INSERT INTO aaa (sent) VALUES ('31.03.2005 13:35:21') > ... > > > Unfourtunately this does not work. I think that one point is a wrong > date-format that should YYYY-MM-DD because of the ISO-mode. From the > manual > I do not understand, where I can change the ISO-mode to an other that > meets > my requirements. > > > I would be happy if anyone can help me - thanks! > the kernel is able to handle different date-time-formats. But unfortunately ODBC (and SQLStudio uses it) defines its own date-time-format looking like ISO. Therefore the kernel has to use ISO if ODBC/SQLStudio is talking to him --> causing the mentioned trouble for users wanting to use a different format. Elke SAP Labs Berlin > -- > Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/maxdb?unsub=elke.zabach@xxxxxxx -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/maxdb?unsub=kevin.wilson@xxxxxxxxxxx -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/maxdb?unsub=alexander.schroeder@xxxxxxx -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | BD Append Not allowed?, John Singleton |
|---|---|
| Next by Date: | SDBINST fails on WinXP, Kostja Dorodov |
| Previous by Thread: | RE: TIMESTAMP/DATE Format & INSERT, Kevin Wilson |
| Next by Thread: | BD Append Not allowed?, John Singleton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|