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

javaÈÕÆÚ´¦Àí

 ×ª£º http://hi.baidu.com/jiong0818/blog/item/93f9b21641294b4d20a4e971.html JavaÖÐÈÕÆÚ¸ñʽת»» /** * ×Ö·û´®×ª»»Îªjava.util.Date
* Ö§³Ö¸ñʽΪ yyyy.MM.dd G 'at' hh:mm:ss z Èç '2002-1-1 AD at 22:10:59 PSD'
* yy/MM/dd HH:mm:ss Èç '2002/1/1 17:55:00'
* yy/MM/dd HH:mm:ss pm Èç '2002/1/1 17:55:00 pm'
* yy-MM-dd HH:mm:ss Èç '2002-1-1 17:55:00'
* yy-MM-dd HH:mm:ss am Èç '2002-1-1 17:55:00 am'
* @param time String ×Ö·û´®
* @return Date ÈÕÆÚ
*/ public static Date stringToDate(String time){ SimpleDateFormat formatter; int tempPos=time.indexOf("AD") ; time=time.trim() ; formatter = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss z"); if(tempPos>-1){ time=time.substring(0,tempPos)+ "¹«Ôª"+time.substring(tempPos+"AD".length());//china formatter = new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss z"); } tempPos=time.indexOf("-"); if(tempPos>-1&&(time.indexOf(" ")<0)){ formatter = new SimpleDateFormat ("yyyyMMddHHmmssZ"); } else if((time.indexOf("/")>-1) &&(time.indexOf(" ")>-1)){ formatter = new SimpleDateFormat ("yyyy/MM/dd HH:mm:ss"); } else if((time.indexOf("-")>-1) &&(time.indexOf(" ")>-1)){ formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); } else if((time.indexOf("/")>-1) &&(time.indexOf("am")>-1) ||(time.indexOf("pm")>-1)){ formatter = new SimpleDateFormat ("yyyy-MM-dd KK:mm:ss a"); } else if((time.indexOf("-")>-1) &&(time.indexOf("am")>-1) ||(time.indexOf("pm")>-1)){ formatter = new SimpleDateFormat ("yyyy-MM-dd KK:mm:ss a"); } ParsePosition pos = new ParsePosition(0); java.util.Date ctime = formatter.parse(time, pos); return ctime; } /** * ½«java.util.Date ¸ñʽת»»Îª×Ö·û´®¸ñʽ'yyyy-MM-dd HH:mm:ss'(24СʱÖÆ)
* ÈçSat May 11 17:24:21 CST 2002 to '2002-05-11 17:24:21'
* @param time Date ÈÕÆÚ
* @return String ×Ö·û´®
*/ public static String dateToString(Date time){ SimpleDateFormat formatter; formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); String ctime = formatter


Ïà¹ØÎĵµ£º

javaʱ¼ä¸ñʽ´óÈ«

import java.text.*;
import java.util.Calendar;
public class VeDate {
/**
   * »ñÈ¡ÏÖÔÚʱ¼ä
   *
   * @return ·µ»Øʱ¼äÀàÐÍ yyyy-MM-dd HH:mm:ss
   */
public static Date getNowDate() {
   Date currentTime = new Date();
   SimpleDate ......

JavaÖÐthis¡¢superÓ÷¨¼ò̸

¡¡¡¡Í¨¹ýÓÃstaticÀ´¶¨Òå·½·¨»ò³ÉÔ±£¬ÎªÎÒÃDZà³ÌÌṩÁËijÖÖ±ãÀû£¬´ÓijÖ̶ֳÈÉÏ¿ÉÒÔ˵ËüÀàËÆÓÚCÓïÑÔÖеÄÈ«¾Öº¯ÊýºÍÈ«¾Ö±äÁ¿¡£µ«ÊÇ£¬²¢²»ÊÇ˵ÓÐÁËÕâÖÖ
±ãÀû£¬Äã±ã¿ÉÒÔË洦ʹÓã¬Èç¹ûÄÇÑùµÄ»°£¬Äã±ãÐèÒªÈÏÕ濼ÂÇÒ»ÏÂ×Ô¼ºÊÇ·ñÔÚÓÃÃæÏò¶ÔÏóµÄ˼Ïë±à³Ì£¬×Ô¼ºµÄ³ÌÐòÊÇ·ñÊÇÃæÏò¶ÔÏóµÄ¡£ºÃÁË£¬ÏÖÔÚ¿ªÊ¼ÌÖÂÛ
this&superÕâÁ½¸ö¹Ø¼ ......

java³õѧÕßÔõôÑù²ÅÄÜѧºÃjava£¿

 
²»Òª¿´µ½±ðÈ˵Ļظ´µÚÒ»¾ä»°¾Í˵£º¸ø¸ö´úÂë°É£¡ÄãÓ¦¸ÃÏëÏëΪʲô¡£µ±Äã×Ô¼ºÏë
³öÀ´Ôٲο¼±ðÈ˵ÄÌáʾ£¬Äã¾ÍÖªµÀ×Ô¼ººÍ±ðÈË˼·µÄ²îÒì¡£
2.³õѧÕßÇë²»Òª¿´Ì«¶àÌ«¶àµÄÊéÄÇ»áÎóÈË×ӵܵģ¬ÏÈÕÒ±¾ÏµÍ³µÄѧ£¬ºÜ¶àÈËÓÃÁ˺ܾÃ
¶¼ÊÇÖ»¶Ô²¿·Ö¹¦ÄÜÊìϤ¶øÒÑ£¬²»ÏµÍ³»¹ÊDz»¹»µÄ¡£
3.¿´°ïÖú,²»ÒªÒòΪºÜÄѶø×Ô¼ºÊdzõѧÕßËùÒ ......

JavaÓë.NET µÄWeb ServicesÏ໥µ÷ÓÃ

   
    
  Ò»:¼ò½é  
  ¡¡¡¡±¾ÎĽéÉÜÁËJavaÓë.NET¿ª·¢µÄWeb   ServicesÏ໥µ÷Óõļ¼Êõ¡£±¾ÎÄ°üÀ¨Á½¸ö²¿·Ö£¬µÚÒ»²¿·Ö½éÉÜÁËÈçºÎÓÃ.NET×ö¿Í»§¶Ëµ÷ÓÃJavaдµÄWeb   Services,µÚ¶þ²¿·Ö½éÉÜÁËÈçºÎÓÃJava×ö¿Í»§¶Ëµ÷ÓÃ.NET¿ª·¢µÄWeb   Services¡£   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ