select columnlists,convert(varchar(10),[date],120) as [date] from partner

解决方案 »

  1.   


    谢谢谢谢~~其实已经解决了~~我在<bean:write .../>里面有个属性format,可以直接格式化日期的`~(*^__^*) 嘻嘻……
      

  2.   

    美女你在取值的时候把它设置一下rs,取出varchar型,再设置一下就好了
    public static String strTotime(String str) {
    java.text.SimpleDateFormat sdf1 = new java.text.SimpleDateFormat(
    "yyyy-MM-dd HH:mm:ss");
    Date date = null;
    try {
    date = sdf1.parse(str);
    } catch (ParseException e) {
    // TODO 自动生成 catch 块
    if (logger.isEnabledFor(org.apache.log4j.Level.ERROR)) {
    logger.error("strTotimetwo(String)", e);
    }
    }
    SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String newstr = sdf2.format(date);
    return newstr; }