Re: Date question



"hoho123" <honmancheung@xxxxxxxxx> wrote:

String dateStr = "01-May-2006"

I have a string of date like above, is there java class I can use to
make it a sql.date object?

Start with java.text.SimpleDateFormat, which will allow you to parse
this string and turn it into a Java Data object. That Date object can
be easily converted into a java.sql.Date object, which can be used
with the various classes in the java.sql package to read from and
write to a database.

--
Tim Slattery
Slattery_T@xxxxxxx
.



Relevant Pages

  • Re: Strings and Hashtables
    ... >digits as possible. ... >there a Java class to generate a UID from a long number or should I code my ... I presume by UID you just mean the long as String. ...
    (comp.lang.java.help)
  • Re: JPasswordField
    ... >in a Java class, compile it, and then study the bytecodes. ... the strings, when using a simple string compare. ... I ran the hash code version of the compare through my copy ...
    (comp.lang.java.help)
  • Cryptography
    ... I have been tasked with writing a small java class that will decrypt a ... protected internal string DecryptValue(string EncryptedValue) ... in my java class so far I have: ...
    (comp.lang.java.programmer)
  • Help with Jar files.. Newbie-ish question?
    ... I'm having a bit of trouble passing a couple of variables to a java class. ... I've compiled the class into a JAR file, and placed it in a subdirectory of my matlab path. ... My Java class is called InDoc, which has a method in it called Insert, which accepts a String and an Integer as its arguments: ... "No class InDoc can be located on Java class path" ...
    (comp.soft-sys.matlab)
  • Re: A little Rolodex [revised]
    ... including alpha sort and searching for any embedded string, ... In this application, a database is a directory, ... you may optionally provide any alternate UCASE program, ... NN -> first store NN as key length ...
    (comp.sys.hp48)