It's not a secret anymore!*
The moose likes JDBC and the fly likes MySql problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySql problem" Watch "MySql problem" New topic
Author

MySql problem

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Hi, its not really a java problem, but its needed in a program I'm doing.

Using mysql 5.1(in windows xp) locally, I can't get to_timestamp(...) function to work.

If I enter on the MySql command prompt:


It just tells me I have an error in the syntax, but I know it works with oracle, and I'm pretty sure the to_timestamp is valid in mysql.

Can anyone help? Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Is it a valid MySQL function? I don't see it in the documentation (I had a quick glance under date/time fucntions - it might be somewhere else).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Well I took off the to_ bit, and now it says:

Truncated incorrect time value: 'YYYY-MM-DD HH24:MI:SS'

So I guess I'm half way there, but can't seem to fix this
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySql problem
 
Similar Threads
My head hurts: JDBC + Java
ORA-01861: literal does not match format string
Two Store Procedure questions
MySQL Error - no driver
Oracle SQL to get Timestamp difference