java中类型的相互转化以及日期

string和int之间的转换
a1=Integer.parseInt(s1); 
s1=Integer.toString(a1);


设置当前的日期格式
Date now=new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
String taskQueryDate = df.format(now);


你可能感兴趣的:(java)