getYear()
getDate()
getHours()
getMinutes()

解决方案 »

  1.   

    也可以从数据库读出时select to_char(time,'yyyy/mm/dd hh:MM') from table"
    insert into table时,to_date(time,'yyyymmddhhmm')转化
      

  2.   

    可能我说的不清楚,我的意思是release字段已有时间比如:(2001-8-12 10:51:11) 
    现在我想让它显示时为(2001-8-12 10:51),就是秒不显示。
    而且在该字段为(2001-12-12 10:51:11)时也要显示(2001-12-12 10:51)
    具体应该怎么写呢?(请全一些)
      

  3.   

    <html>
    <head>
    <title></title>
    </head>
    <body><html>
    <head>
    <script language="javascript">
    function changeDate(){
    var tmp = document.all.txt.value;
    document.all.txt.value=tmp.substring(0,tmp.length-3);
    }
    </script>
    </head>
    <body>
    <form name="frm">
    <input type="text" name="txt" value="2001-8-12 10:51:11">
    <input type="button" name="changed" value="click" onclick="changeDate();">
    </form>
    </body>
    </html> 
    </body>
    </html>