java - Converting String date to SQL Date -
i have string date in format dd/mm/yy (16/07/13)
how convert string date sql date format (maintaining same dd/mm/yy format)
storing in oracle db.. ??
use simpledateformat
:
simpledateformat sdf = new simpledateformat("dd/mm/yy"); string stringwithdate = "16/07/13"; date thedate = sdf.parse(stringwithdate); //store thedate variable in database...
note simpledateformat#parse
throws parseexception
.
Comments
Post a Comment