oracle數(shù)據(jù)庫 Oracle數(shù)據(jù)庫中插入timestamp類型的數(shù)據(jù)?
Oracle數(shù)據(jù)庫中插入timestamp類型的數(shù)據(jù)?將oracle的TIMESTAMP類型轉為Date類型? 1. 日期類型轉換為字符串類型:simpledateformat SDF=new sim
Oracle數(shù)據(jù)庫中插入timestamp類型的數(shù)據(jù)?
將oracle的TIMESTAMP類型轉為Date類型?
1. 日期類型轉換為字符串類型:simpledateformat SDF=new simpledateformat(“yyyy-MM-DD HH:MM:SS”)simpledateformat SDF1=new simpledateformat(“yyyymmdd”)string str=sdf.format格式(date1)字符串str1=sdf1.format(date1)系統(tǒng)輸出打印(str公司)系統(tǒng)輸出打?。⊿TR1)說明:SDF和SDF1只是格式化您不懂的類型。類型可以自由定義。2字符串到時間戳類型的轉換:1。字符串到時間戳類型的轉換:字符串str3=“2011-02-02 12:12:12”Timestamp.valueOf(str3)系統(tǒng)輸出打印( Timestamp.valueOf(str3))