SQL ServerÖÐÎÄ°æµÄĬÈϵÄÈÕÆÚ×Ö¶Îdatetime¸ñʽÊÇyyyy-mm-dd Thh:mm:ss.mmm
ÀýÈç:
select getdate()
2004-09-12 11:06:08.177
ÕûÀíÁËÒ»ÏÂSQL ServerÀïÃæ¿ÉÄܾ³£»áÓõ½µÄÈÕÆÚ¸ñʽת»»·½·¨:
¾ÙÀýÈçÏÂ:
select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')
20040912110608
select CONVERT(varchar(12) , getdate(), 111 )
2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )
20040912
select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12
select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004
select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004
select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004
select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004
select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004
select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004
select CONVERT(varchar(12) , getdate(), 108 )
11:06:08
select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1
select CONVERT(varchar(12) , getdate(), 110 )
09-12-2004
select CONVERT(varchar(12) , getdate(), 113 )
12 09 2004 1
select CONVERT(varchar(12) , getdate(), 114 )
11:06:08.177
PHP¶ÁÈ¡MYSQLÊý¾Ý¿â»òMSSQLÊý¾Ý¿âʱ£¬ÓÐʱ³öÏÖÂÒÂ룬ÕâÊÇPHP.iniÖÐÅäÖúÍ.phpÒ³Ãæ±àÂë²»Ò»ÖÂÒýÆðµÄ¡£
½â¾ö°ì·¨£º
1¡¢Ê×ÏÈ£¬½«PHP.iniÖÐÉèÖÃΪdefault_charset = "gb2312"£¬È»ºóÖØÆôApache¡£
Õâʱ´ÓÊý¾Ý¿âÖÐÌáÈ¡µÄ½á¹û¼¯¿ÉÒÔÕý³£ÏÔʾÖÐÎÄÁË£¬µ«.phpÒ³ÃæÖеÄÁÐÃûÒ²ÓпÉÄÜÏÔʾÂÒÂëÁË¡£ÕâÑù½â¾ö£¬
2¡¢È»ºó£¬PH ......
ÔÚµçÄÔÉÏ×°Á˸öÐéÄâ»ú£¬±¾»ú×°Á˸öMSSQL2000,ÔÚÐéÄâ»úÒ²×°Á˸öMSSQL2000£¬µ«Êǵ±Á¬½ÓÐéÄâ»úÉϵÄMSSQL£¬SQLÌáʾ³ö´í£¬ÎÞ·¨Á¬½Ó£¬¾õµÃºÜÆæ¹Ö£¬ÒòΪIPµØÖ·ÊDz»Í¬µÄ£¬×îºóÏëµ½Á˸ö°ì·¨£¬ÒòΪÊÇһ̨µçÄÔ£¬ËùÒԶ˿Ú1433Ö»ÓÐÒ»¸ö£¬±¾»úÕ¼ÁË1433£¬ÄÇôÐéÄâ»ú¾Íû·¨ÓÃÁË£¬Ïëµ½¾Í×ö£¬°ÑÐéÄâ»úµÄ¶Ë¿Ú¸Ä³ÉÁË1500¡£ÖØÆôµçÄÔ£¬µ«ÊÇ»¹ÊDz»Ä ......