JavaÈÕÆÚ¸ñʽ»¯³£Ó÷½·¨
JavaÖÐDateÀàÖеÄһЩÈÕÆÚ¸ñʽ»°·½·¨¶¼ÒѹýÆÚ£¬ËùÒÔ²»ÍƼöʹÓá£
Ò»°ã¸ñʽ»¯Ê±£¬³£Óõ½ÕâÁ½¸öÀࣺCalendar
ºÍSimpleDateFormat
£¬Ê¹Ó÷½·¨ÈçÏ£º
1.CalendarÀà
CalendarÀàÊÇabstractµÄ£¬ËùÒÔʵÀý»¯·½Ê½µÃÓþ²Ì¬·½·¨£º
Calendar c = Calendar.getInstance();£¬
´ËʱµÄÉú³ÉµÄʵÀýÒÀ¾ÝµÄÊǵ±Ç°ÏµÍ³Ê±¼ä£»c.setTime(java.util.Date date)¿ÉÒÔÉ趨Ï붨µÄʱ¼ä¡£
Àý£©
Date date = rs.getDate("hiredate");
Calendar ca = Calendar.getInstance();
ca.setTime(date);
System.out.print(ca.get(Calendar.MONTH) + 1
2.SimpleDateFormatÀà
Date date = rs.getDate("hiredate");
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.applyPattern("yyyy/MM/dd HH:mm:ss");
System.out.println(sdf.format(date));
Ïà¹ØÎĵµ£º
2008 Äê 6 ÔÂ 24 ÈÕ
ÔÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......
×òÌìÓиöÅóÓÑÎÊÎÒ£¬Ñ§µÃ»á²»,°³ËµÑ§µÄ»á£¡
ºóÀ´ËûÓÖÎÊÎÒ£¬ËûÈç¹ûѧµÄ»°£¬Ñ§µÄ»áѧ²»»á£¬°³ËµÖ»Òª²»±¿µ°£¬°ÑÐÄ˼·ÅÔÚjavaÉÏ£¬¾ÍÒ»¶¨Ñ§µÄ»á£¡
ʱ¼äÒ»Ö±¹ýµÄ¶¼ºÜ¿ì£¬Ã¿¸öÈËÄÜ°ÑÎÕµÄÒ²Ö»ÓнñÌ죬ËùÒÔ¼´Ê¹À§ÄÑÔٶֻ࣬ÓдËʱ´Ë¿Ì×Ô¼ºÔÚ²»Í£µÄŬÁ¦¡£
ÄÄÅÂÏñÎÏÅ£Ò»ÑùµÄÇ°½ø£¬Ò²Ò»¶¨Óгɹ¦µÄÒ»Ì죬¾ÍÅÂ×Ô¼º·ÅÆú£¬ÅÂ×Ô¼ºÃ»ÓÐÐÅÐÄ£ ......
Ê×ÏÈÔÚLinuxÉÏ´´½¨Ò»¸ö¹²ÏíÎļþ¼Ð
mkdir /home/user/share
ÓÃrootÓû§Æô¶¯samba·þÎñ
service smb start
ÐÞ¸Äsmb.confÎļþ
sudo gedit /etc/samba/smb.conf »òÕß vi /etc/samba/smb.conf
[share]
path = /home/user/share
...
writable = yes
´´½¨¹²ÏíÓû§²¢ÉèÖÃÃÜÂë
sudo useradd smbusr
sudo smbpasswd -a s ......
// ºÏ²¢ List ÖеÄÏàͬÊý¾ÝÐÐ
// Source £º tmpOrderEntryListBeanList
// Target £º resultOrderEntryListBeanList
// ------------------------------------------------------------------
// £¨1£©½«½á¹û¸³¸ø Result Livon 2010-5-18 Èý
// ÕûÀíÁÐ±í£¬ÒÔ±ã²éѯ¿â´æ¡£
private List<OrderEntryListBe ......
Ê×ÏÈÎÒÃÇÒªÏÈдһ¸ö±¸·ÝÀà
BackupDb.java
´úÂëÈçÏ£º
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class BackupDb {
public BackupDb() {
}
public String back ......