aspÖпØÖÆʱ¼äÏÔʾ/´æ´¢Ñùʽ
FormatDateTime
·µ»Ø±í´ïʽ£¬´Ë±í´ïʽÒѱ»¸ñʽ»¯ÎªÈÕÆÚ»òʱ¼ä¡£
FormatDateTime(Date[, NamedFormat])
²ÎÊý
Date
±ØÑ¡Ïî¡£Òª±»¸ñʽ»¯µÄÈÕÆÚ±í´ïʽ¡£
NamedFormat
¿ÉÑ¡ÏָʾËùʹÓõÄÈÕÆÚ/ʱ¼ä¸ñʽµÄÊýÖµ£¬Èç¹ûÊ¡ÂÔ£¬ÔòʹÓà vbGeneralDate¡£
ÉèÖÃ
NamedFormat ²ÎÊý¿ÉÒÔÓÐÒÔÏÂÖµ£º
³£Êý Öµ ÃèÊö
vbGeneralDate 0 ÏÔʾÈÕÆÚºÍ/»òʱ¼ä¡£Èç¹ûÓÐÈÕÆÚ²¿·Ö£¬Ôò½«¸Ã²¿·ÖÏÔʾΪ¶ÌÈÕÆÚ¸ñʽ¡£Èç¹ûÓÐʱ¼ä²¿·Ö£¬Ôò½«¸Ã²¿·ÖÏÔʾΪ³¤Ê±¼ä¸ñʽ¡£Èç¹û¶¼´æÔÚ£¬ÔòÏÔʾËùÓв¿·Ö¡£
vbLongDate 1 ʹÓüÆËã»úÇøÓòÉèÖÃÖÐÖ¸¶¨µÄ³¤ÈÕÆÚ¸ñʽÏÔʾÈÕÆÚ¡£
vbShortDate 2 ʹÓüÆËã»úÇøÓòÉèÖÃÖÐÖ¸¶¨µÄ¶ÌÈÕÆÚ¸ñʽÏÔʾÈÕÆÚ¡£
vbLongTime 3 ʹÓüÆËã»úÇøÓòÉèÖÃÖÐÖ¸¶¨µÄʱ¼ä¸ñʽÏÔʾʱ¼ä¡£
vbShortTime 4 ʹÓà 24 Сʱ¸ñʽ (hh:mm) ÏÔʾʱ¼ä¡£
˵Ã÷
ÏÂÃæÀý×ÓÀûÓà FormatDateTime º¯Êý°Ñ±í´ïʽ¸ñʽ»¯Îª³¤ÈÕÆÚÐͲ¢ÇÒ°ÑËü¸³¸ø MyDateTime:
Function GetCurrentDate
'FormatDateTime °ÑÈÕÆÚÐ͸ñʽ»¯Îª³¤ÈÕÆÚÐÍ¡£
GetCurrentDate = FormatDateTime(Date, 1)
End Function
ʾÀýÒ³Ã棺
dateÊÇ£º2007-2-26
timeÊÇ£º13:28:43
formatdatetime(date,0)ÊÇ£º2007-2-26
formatdatetime(date,1)ÊÇ£º2007Äê2ÔÂ26ÈÕ
formatdatetime(date,2)ÊÇ£º2007-2-26
formatdatetime(date,3)ÊÇ£º0:00:00
formatdatetime(date,4)ÊÇ£º00:00
nowÊÇ£º2007-2-26 13:28:43
formatdatetime(now,0)ÊÇ£º2007-2-26 13:28:43
formatdatetime(now,1)ÊÇ£º2007Äê2ÔÂ26ÈÕ
formatdatetime(now,2)ÊÇ£º2007-2-26
formatdatetime(now,3)ÊÇ£º13:28:43
formatdatetime(now,4)ÊÇ£º13:28
Ïà¹ØÎĵµ£º
ÒõÑôÃá
¡¡¡¡´Ó½ñÌ쿪ʼÆ𣬻ù¶½É½½«ºÍ´ó¼ÒÒ»Æð½øÈëASP.net Öî¶à³ÌÐòµÄѧϰÖУ¬ÀÏʵ˵£¬.netµ½µ×ÊÇ·¨±¦»¹ÊÇÀ¬»ø£¬ÎÒÃÇÊÃÄ¿ÒÔ´ý¡£ÓÐÈκÎÎÊÌ⣬ÁªÂç»ù¶½É½ seaman@163.com
ʲôÊÇASP.net£¬ASP.netµÄ°²×°
¡¡¡¡1.1 ʲôÊÇASP.net
¡¡¡¡ASP.net ÊÇÒ»ÖÖ½¨Á¢ÔÚͨÓÃÓïÑÔÉϵijÌÐò¹¹¼Ü£¬Äܱ»ÓÃÓÚһ̨Web·þÎñÆ÷À´½¨Á¢Ç¿´óµÄWebÓ¦Óó ......
±àд¹ý³Ì
¹ý³ÌÊÇÒ»×éÄÜÖ´ÐÐÖ¸¶¨ÈÎÎñÇÒ¾ßÓзµ»ØÖµµÄ½Å±¾ÃüÁî¡£Äú¿ÉÒÔ¶¨Òå×Ô¼ºµÄ¹ý³Ì£¬È»ºóÔڽű¾Öз´¸´µ÷ÓÃËüÃÇ¡£
Äú¿ÉÒÔ½«¹ý³Ì¶¨Òå·ÅÔÚµ÷Óùý³ÌµÄ .asp ÎļþÖУ¬Ò²¿ÉÒÔ½«Í¨Óùý³Ì·ÅÔÚÒ»¸ö¹²ÏíµÄ .asp ÎļþÖУ¬È»ºóÓà SSI #include Ö¸ÁÆä°üº¬½øÆäËûµ÷ÓÃÆä¹ý³ÌµÄ .asp ÎļþÖС£Äú»¹¿ÉÑ¡ÔñÁíÒ»ÖÖ·½·¨£¬¼´°ÑÕâЩ¹¦ÄÜ´ò°ü ......
Application ¶ÔÏó
¼¯ºÏ£º
Contents
StaticObjects
·½·¨£º
Lock
Unlock
ʼþ£º
Application_OnEnd
Application_OnStart
ObjectContext ¶ÔÏó
·½·¨£º
SetAbort
SetComplete
ʼþ£º
OnTransactionAbort
OnTransactionCommit
Request ¶ÔÏó
¼¯ºÏ£º
ClientCertificate
Cookies
Form
Q ......
Active Server Pages ÌṩÄÚ½¨¶ÔÏó£¬ÕâЩ¶ÔÏóʹÓû§¸üÈÝÒ×ÊÕ¼¯Í¨¹ýä¯ÀÀÆ÷ÇëÇó·¢Ë͵ÄÐÅÏ¢¡¢ÏìÓ¦ä¯ÀÀÆ÷ÒÔ¼°´æ´¢Óû§ÐÅÏ¢£¨ÈçÓû§Ê×Ñ¡Ï¡£±¾ÎļòҪ˵Ã÷ÿһ¸ö¶ÔÏó¡£
Application ¶ÔÏó
¿ÉÒÔʹÓà Application ¶ÔÏóʹ¸ø¶¨Ó¦ÓóÌÐòµÄËùÓÐÓû§¹²ÏíÐÅÏ¢¡£
Request ¶ÔÏó
¿ÉÒÔʹÓà Request ¶ÔÏó·ÃÎÊÈκÎÓà HTTP ÇëÇó ......
³£ÓõĽű¾ÓïÑÔÓÐ Javascript ºÍ VBscript ¡£
ʹÓÃÄÄÖÖÓïÑÔÐèÏÈÉ趨¡£ÈçÉϽڴúÂëÖеÄ<%@ LANGUAGE="JSCRIPT" ... %>¡£
Èç¹ûûÓÐÖ¸¶¨£¬ÏµÍ³¾Í»áʹÓà IIS ³ÌÐòÖ¸¶¨µÄ½Å±¾ÓïÑÔ¡£
VBscript Ó÷¨
VBscript Ò»°ã·ÅÔÚ <head> Óë </head> ÄÚµÄ <% ºÍ %> Ö®¼ä¡£
´ú ......