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

java£¬php£¬mysqlʱ¼ä´¦Àí

javaÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
»ñÈ¡µ±Ç°µÄunixʱ¼ä´Á
new Date().getTime()
System.currentTimeMillis()
·µ»ØµÄÊǺÁÃëÊý£¬Òª×ª»»long t = System.currentTimeMillis()/1000;
»ñÈ¡µ±Ç°ÄêÔÂÈÕÒÔ¼°Ê±·ÖÃë
Calendar c = Calendar.getInstance();
c.get(Calendar.YEAR))  c.get(Calendar.YEAR))  c.get(Calendar.DATE)
½«UNIXʱ¼ä´Áת»»³Éʱ¼ä×Ö·û´®
new SimpleDateFormat("yyyy/MM/dd").format(new Date(timestamp*1000));
½«Ê±¼ä×Ö·û´®×ª»»³ÉUNIXʱ¼ä´Á
new java.text.SimpleDateFormat (”dd/MM/yyyy HH:mm:ss”).parse(”09/22/2008 16:33:00″).getTime()
ÔÚjavaÖÐ×Ö·û´®ºÍunixʱ¼ä´ÁÖ®¼äÓÐÒ»¸öÖÐרÀàÐÍÊÇDate
Date.getTime()  ÓÉDateµ½unixtime
new Date(unixtime)  ÓÉunixtimeµ½Date
×¢Ò⣺
Çë×¢Ò⣡¶ÔÓ벻ͬµÄÊ±Çø´¦ÀíÉÏÓвîÒ죬Ê×ÏÈÒªÇå³þ×Ô¼ºËùÔÚµÄÊ±Çø¡£
String timezone_info = System.getProperty(”user.timezone”);
System.out.println(”µ±Ç°µÄÊ±Çø:”+timezone_info);
System.out.println(”Ê±ÇøÐÅÏ¢:”+TimeZone.getDefault());
Êä³ö£º
µ±Ç°µÄÊ±Çø:Asia/Shanghai
Ê±ÇøÐÅÏ¢:sun.util.calendar.ZoneInfo[id="Asia/Shanghai",offset=28800000,
dstSavings=0,useDaylight=false,transitions=19,lastRule=null]
´¦Àí²»Í¬µÄÊ±ÇøµÄ·½·¨£º
SimpleDateFormat sd = new SimpleDateFormat(”yyyy-MM-dd HH:mm:ss”);
sd.setTimeZone(TimeZone.getTimeZone(”GMT+8″));
String strDate = sd.format(new Date(1215782027390L));
System.out.println(”Õý°ËÇøµ±Ç°Ê±¼ä:”+strDate);
Êä³ö£º
Õý°ËÇøµ±Ç°Ê±¼ä:2008-07-11 21:13:47
phpÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
mktime()
date("format", unixtime)
time()
date('Y')
mysqlÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
°Ñʱ¼ä×Ö·û´®×ªÎªunixʱ¼ä´Á£¨¸ñʽҪYYYY-mm-dd hh:ii:ss) ¼´Êý¾Ý¿âÖÐtimestampÉú³ÉµÄ
UNIX_TIMESTAMP(date)
°Ñunixʱ¼ä´ÁתΪʱ¼ä×Ö·û´®
DATE_FORMAT(date,format)
»ñÈ¡µ±Ç°Ê±¼ä£¨unixʱ¼ä´Á£©
now
¸ù¾Ýformat×Ö·û´®¸ñʽ»¯dateÖµ¡£
%M ÔÂÃû×Ö(January……December)
%W ÐÇÆÚÃû×Ö(Sunday……Saturday)
%D ÓÐÓ¢Óïǰ׺µÄÔ·ݵÄÈÕÆÚ(1st, 2nd, 3rd, µÈµÈ¡££©
%Y Äê, Êý×Ö,


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

ubuntuÖÐmysqlÂÒÂëÎÊÌâ

 ÏÈ¿´ÏÂÃæ×¢ÒâÄÚÈÝ
ÕûÕûŪÁËÒ»Ì죬ÖÕÓÚ½â¾öÁËjdbc(mysql-connector-java-5.0.30)ºÍmysqͨÐÅÖÐÎÄÂÒÂëµÄÎÊÌ⣡ÎÒµÄϵͳÊÇ
linux£¨ubuntu£©¡£ÔÚjavaÖУ¨Myeclipse»·¾³£©Ê¹ÓÃhibernateÁ¬½Ómysql¡£´æ´¢Ó¢ÎÄûÎÊÌ⣬д£¨insert
into£©ºÍ¶Á£¨select£©¶¼ÄÜÕýÈ·ÏÔʾ£¬µ«ÊÇÈôÆäÖдøÓÐÖÐÎÄ×Ö·û¾Í³ÉÂÒÂëÁË¡£µ½ÍøÉϲéÕÒÁ˰ëÌì×ÊÁ ......

php ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨

php ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨
2009-10-20 13:56
ÔÚÒ»Ð©ÌØÊâÓ¦ÓÃÖУ¬ÐèÒªÉú³ÉËæ»ú×Ö·û´®£¬±ÈÈçÉú³ÉÏµÍ³Ëæ»úÃÜÂë»òÕßÊǵǽÑéÖ¤ÂëµÈ£¬±¾ÎĽéÉܵĺ¯ÊýÄܹ»·µ»ØÖ¸¶¨³¤¶ÈµÄËæ»ú×Ö·û´®£¬Ä¬Èϰüº¬´óСд×ÖĸºÍÊý×Ö£¬Äã¿ÉÒÔºÜÈÝÒ×µÄÐÞ¸ÄÒÔ±ã·ûºÏ×Ô¼ºµÄÐèÒª¡£
<?php
// ˵Ã÷£ºphp ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨
// ÕûÀí£ºhttp://ww ......

PHP´¦ÀíÔÚÏßÓû§

 ×ªÌù×Ô: http://hi.baidu.com/isnono/blog/item/3c94ea11a54a0fc7a7ef3f94.html
¾­³£ÔÚCSDNµÄPHPÂÛ̳ÉÏ¿´µ½ÓÐÅóÓÑÎÊ´¦ÀíÔÚÏßÓû§µÄÎÊÌâ,ÎÒд¹ýÀàËÆµÄ´úÂë,¾ÍÄóöÀ´Ï׳óÁË,ÓеãÀ¬»ø,»ù±¾ÉÏʵÏÖÁ˹¦ÄÜ, ͬÊÇÒ²Äܹ»À©Õ¹£¬±ÈÈçͬʱֻÔÊÐíÒ»¸öÕʺÅÔÚÏߵȡ£
/*
³ÌÐòÓÃ;£º¼ì²âÔÚÏßÓû§
³ÌÐò×÷Õߣºheiyeluren
д×÷ʱ¼ä ......

php¶ÔͼƬÌí¼ÓˮӡÀà

 /*
* ¹¦ÄÜ£ºPHP
ͼƬˮӡ (ˮӡ֧³ÖͼƬ»òÎÄ×Ö)
* ²ÎÊý£º
*      $product_img    ±³¾°Í¼Æ¬£¬¼´ÐèÒª¼ÓˮӡµÄͼƬ£¬ÔÝÖ»Ö§³ÖGIF,JPG,PNG¸ñʽ£»
*      $waterPos        Ë®Ó¡Î»Öã¬ÓÐ10ÖÖ״̬£¬0ÎªËæ»úλÖã»
*  &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ