mssqlÖеÄÈÕÆÚת»»£¬ÇóÖú - MS-SQL Server / »ù´¡Àà
Ïë°ÑÈÕÆÚ 2004-09-12 11:06:08.177 ת»¯³É 2004.09.12 ÕâÖÖÐÎʽ£¬¸ÃÔõô×ö£¡
Ϊʲôselect convert(VARCHAR(10),'2006-07-28',102) ÕâÖÖ²Ù×÷ûÓб仯ÄØ~£¿
SQL code:
select convert(VARCHAR(10),cast('2006-07-28' as datetime),102)
/*
----------
2006.07.28
(1 ÐÐÊÜÓ°Ïì)
*/
SQL code:
select convert(varchar(10),cast('2004-09-12 11:06:08.177' as datetime),102)
/*
----------
2004.09.12
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
*/
¿ÉÒÔÖ±½Ó°Ñ-Ìæ»»³É.
SQL code:
--ÈÕÆÚת»»²ÎÊý,ÖµµÃÊÕ²Ø
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(), 1
Ïà¹ØÎÊ´ð£º
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì »·¾³ÊÇSQL2000Êý¾Ý¿â
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
Ñ»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)
......
×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......
ÏÂÃæÊÇXML³õʼÎļþÄÚÈÝ
XML code:
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......
Çë½Ì¸ßÊÖ£º
ÒÔÏÂÊÇÊý¾Ý¿âÖеÄÈýÌõ¼Ç¼£¬Ó¢ÎÄΪ×Ö¶ÎÃû³Æ
id planname TaskBeginTime Status
329 2010Äê03 ......