File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "MySql problem" Watch "MySql problem" New topic

MySql problem

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
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

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: 750
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:
subject: MySql problem
It's not a secret anymore!