Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jsp²éѯÏÔʾµÄÎÊÌâ - Java / Web ¿ª·¢

String sql="select distinct xfdate from xiaofei where regname like '%"+userid+"%' order by xfdate";
 ResultSet rs = stmt.executeQuery(sql);

°´ÒÔÉϲéѯµÄ½á¹ûÊÇ
2009/9/7
2009/9/10
2009/10/12
2010/1/3
2010/10/23

µ«ÊÇÎÒÏë°ÑËüÏÔʾ³É

2009/9/
2009/9/
2009/10/
2010/1/
2010/10/

Çë½Ì´úÂëÓ¦¸ÃÔõôд£¿
Äã´æ´¢ÀàÐÍÊÇʲôѽ? È¡³öÀ´Ö±½ÓÊä³öÊÇ2009/9/7Õâ¸öÑùʽµÄ?

Èç¹ûÄãµÄÊý¾Ý¿â´æ´¢ÀàÐÍΪʱ¼äÀàÐÍ,Äã¿ÉÒÔʹÓÃSimpleDateFormatÕâ¸öÀà,´ó¸ÅÊÇÕâÑù×ö
Java code:

SimpleDateFormat sdf=new SimpleDateFormat("YYYY/MM/");
sdf.format(date);



¶Ô£¬Ö±½ÓÊä³ö¾ÍÊÇ2009/9/7Õâ¸öʽÑùµÄ£¬ÖÁÓÚÀàÐͲ»ÊÇÈÕÆÚÀàÐ͵ģ¬ËùÒÔ²»ÖªµÀ¸ÃÔõô¸Ä

ÊÇÔÚÓÃORACLEÂ𣿠ºÜ¼òµ¥£¬Èç¹û²éѯ³öÀ´µÄÊÇstring Ö±½Ó sqlÓï¾ä¸ÄΪ String sql="select distinct to_char(xfdate,'yyyy/mm/') from xiaofei where regname like '%"+userid+"%' order by xfdate";Èç¹û²éѯ³öÀ´µÄÊÇdate ¸ÄΪsqlÓï¾ä¸ÄΪ String sql="select distinct to_date(to_char(xfdate,'yyyy/mm/'),'yyyy/mm/') from xiaofei where regname like '%"+userid+"%' order by xfdate";


ÓöþÂ¥µÄ·½·¨

Æäʵһ°ã¶¼ÊÇÊä³ö£¨yyyy-mm-dd£©2010-01-05 ÕâÖÖÐÎʽµÄ

ÖÁÓÚ²»ÊÇÈÕÆÚÀàÐÍ£¬¾Í¿ÉÒÔÔÚ¶Á³öÀ´Ö®ºóʹÓÃStringÀàµÄsubstringº¯Êý´¦ÀíÒ»ÏÂÔÙÏÔʾ

°ÑÄãµÄsqlÐ޸ijɣº

Str


Ïà¹ØÎÊ´ð£º

java socket email ÎÊÌâ - Java / Java SE

ÎÒÔÚ javaºËÐļ¼ÊõÉÏ ¿´ÁËÒ»¸ö ÀûÓà Java socket emailµÄÀý×Ó ¿ÉÊÇÔõôҲ ²»³É¹¦ Ϊʲô£¿
Ô´Âë
Java code:

package cn.com.test.email;
import java.awt.GridBagLayout;
import java.awt.event.Action ......

HTML±êÇ©µ×²ãµÄʵÏÖÔ­Àí¡¢»úÖÆ - Java / Java SE

ΪʲôHTMLÒÔ¼°Ò»Ð©ÆäËü±êÇ©»áÏÔÊ¾Ò»Ð©ÌØ¶¨±íÏÖÐÎÊ½ÄØ£¿ÈçHTMLÖеĻ»ÐбêÇ©<BR/>ÔڵײãÊÇÔõÑùʵÏÖµÄÄØ£¿ÏÖʵµÄÔ­ÀíÊÇÊ²Ã´ÄØ
È¥W3C¹Ù·½ÍøÕ¾ÉÏ£¬¿´¿´°É£¡ÎÒÏëÒ»¿´Äã¾ÍÃ÷°×ÁË

ÎҲºͱàÒëÔ­ÀíÓйأ¬ä¯ÀÀÆ÷Àï¿É ......

c/sºÍb/sÖ®¼äÔõôͨѶ. - Java / Web ¿ª·¢

ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾­ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾ­Ìá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......

jspºÍtomcatÎÊÌ⣬¿ì·èÁË - Java / Java EE

ÎÒдÁ˸öjspÒ³Ãæ£¬È»ºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³ÃæÊ±£¬ËÀ»î¶¼ÊÇÔ­À´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØÐ²¿ÊðÕâ ......

javaÖд«Öµ - Java / Web ¿ª·¢

ÔõôÑù½«id´«¹ýÈ¥°¡£¿£¿£¿ÊǼòµ¥µÄ´«¡£¡£¡£ÔÚµØÖ·À¸ÖÐдidºÅ
LZ ºÃÓÄĬ£¡²»ÖªµÀÄãµÄÒâ˼£¿

ÊÇÏë°ÑID ´«µ½ACTION ? ͨ¹ýURl id=?

²»¹»Ïêϸ ±ðÈ˲»ÖªµÀÔõÑù°ïÄã

../XXXXX.do?id=XXXX&id2=XXXXX

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ