2013年11月14日星期四

About the date time type conversion

Stored procedure return type is date time DMY , I use date type variable access , cited classes are sql.date, but the screen display is October 8 , 2013 , this form , I checked , the database is 2013/10/8
------ Solution ----------------------------------- ---------
format
------ For reference only ------------------------- --------------
convert it with SimpleDateFormt

SimpleDateFormt sdf=new SimpleDateFormt("yyyy/MM/dd");
String dateString=sdf.format(date);

------ For reference only ----------------------------------- ----
format look under
------ For reference I can only ---------------------------------------
difference I can format Come, is the stored procedure returns a collection of how format
------ For reference only ---------------------------- -----------
inside turn in the same sentence .

oracle to_date (to_char (date, "yyyy-MM-dd"))
sqlserver convert ()

没有评论:

发表评论