conversion of string into java.sql.Date


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: conversion of string into java.sql.Date

Threaded View

  1. #1
    Join Date
    Jun 2005
    Posts
    15

    conversion of string into java.sql.Date

    hi,
    i have a string in this format:-

    String s = year+"-"+e_month+"-"+date;

    and i want to covert it into

    java.sql.Date sqlToday ;

    so that i can save my values in the data base
    i did every thing realted to that like:-

    SimpleDateFormat ts= new SimpleDateFormat("yyyy-MM-dd");
    sqlToday = new java.sql.Date(ts.parse(s).getTime());

    but couldnt get the results
    so any one can help me
    thanks
    Last edited by vikassheelgupta; 08-16-2005 at 06:01 AM. Reason: rectify one errror that i can think once again

Similar Threads

  1. Input string was not in a correct format
    By mdengler in forum ASP.NET
    Replies: 0
    Last Post: 11-26-2002, 02:32 PM
  2. Replies: 1
    Last Post: 06-05-2001, 06:12 AM
  3. How do I detect an FTP timeout?
    By Julian Milano in forum VB Classic
    Replies: 0
    Last Post: 08-10-2000, 09:16 PM
  4. Replies: 0
    Last Post: 06-22-2000, 07:30 AM
  5. Database problems
    By Robert Rieth in forum VB Classic
    Replies: 1
    Last Post: 04-11-2000, 03:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center