VBScriptº¯Êý²éѯ

Ê×Ò³ > VBScriptº¯Êý
VBScript º¯Êý ¹¦ÄÜ˵Ã÷ Àý×Ó

Abs £¨ÊýÖµ£©
¾ø¶ÔÖµ¡£Ò»¸öÊý×ֵľø¶ÔÖµÊÇËüµÄÕýÖµ¡£¿Õ×Ö·û´® (null) µÄ¾ø¶ÔÖµ£¬Ò²ÊÇ¿Õ×Ö·û´®¡£Î´³õʼ»¯µÄ±äÊý£¬Æä¾ø¶ÔΪ 0 Àý×Ó£ºABS(-2000)
½á¹û£º2000
Array £¨ÒÔ¶ºµã·Ö¸ôµÄÊý×éÔªËØ£© Array º¯Êý´«»ØÊý×éÔªËصÄÖµ¡£ Àý×Ó£º
A=Array(1,2,3)
B=A(2)
½á¹û£º 2
˵Ã÷£º±äÁ¿£ÂΪ£ÁÊý×éµÄµÚ¶þ¸öÔªËصÄÖµ¡£
£Ásc £¨×Ö·û´®£© ½«×Ö·û´®µÄµÚÒ»×Öĸת»»³É ANSI £¨ÃÀ¹ú¹ú¼Ò±ê×¼·ûºÅ£©×ÖÂë¡£ Àý×Ó£º£Ásc£¨£¢Internet£¢£©
½á¹û£º73
˵Ã÷£ºÏÔʾµÚÒ»×Öĸ I µÄ ANSI ×ÖÂë¡£
CBool£¨±í´ïʽ£© ת»»³É²¼¶ûÂß¼­Öµ±äÁ¿ÐÍ̬£¨£Ôrue »ò£Æalse £© Àý×Ó£ºCBool£¨1+2£©
½á¹û£ºTrue
CDate £¨ÈÕÆÚ±í´ïʽ£© »»³ÉÈÕÆÚ±äÁ¿ÐÍ̬¡£¿ÉÏÈʹÓà IsDate º¯ÊýÅжÏÊÇ·ñ¿ÉÒÔת»»³ÉÈÕ ÆÚ¡£ Àý×Ó£º CDate (now( )+2)
½á¹û£º2000/5/28 10:30:59
CDbl£¨±í´ïʽ£© ת»»³ÉDOUBLE±äÁ¿ÐÍ̬¡£
Chr £¨ ANSI ×ÖÂ룩 ½«ASCII ×ÖÂëת»»³É×Ö·û¡£ Àý×Ó£º Chr £¨ 72 £©
½á¹û£º H
CInt £¨±í´ïʽ£© ת»»³ÉÕûÊý±äÁ¿ÐÍ̬¡£ Àý×Ó£º CInt ("3.12")
½á¹û£º 3
CLng £¨±í´ïʽ£© ת»»³ÉLONG ±äÁ¿ÐÍ̬¡£
CSng £¨±í´ïʽ£© ת»»³ÉSINGLE ±äÁ¿ÐÍ̬¡£
CStr £¨±í´ïʽ£© ת»»³É×Ö·û´®±äÁ¿ÐÍ̬¡£
Date £¨ £© ´«»ØϵͳµÄÈÕÆÚ¡£ Àý×Ó£º Date
½á¹û£º 2000/5/13
DateAdd £¨ I , N , D £© ½«Ò»¸öÈÕÆÚ¼ÓÉÏÒ»¶ÎÆÚ¼äºóµÄÈÕÆÚ¡£ I £ºÉ趨һ¸öÈÕÆÚ£¨ Date £©Ëù¼ÓÉϵÄÒ»¶ÎÆÚ¼äµÄµ¥Î»¡£Æ©Èç interval="d" ±íʾ NµÄµ¥Î»ÎªÈÕ¡£ IµÄÉ趨ֵÈçÏ£º
yyyy Year Äê
q Quarter ¼¾
m Month ÔÂ
d Day ÈÕ
w Weekday ÐÇÆÚ
h Hour ʱ
n Minute ·Ö
s Second Ãë
N £ºÊýÖµ±í´ïʽ£¬É趨һ¸öÈÕÆÚËù¼ÓÉϵÄÒ»¶ÎÆڼ䣬¿ÉΪÕýÖµ»ò¸ºÖµ£¬ÕýÖµ±íʾ¼Ó£¨½á¹ûΪ >date ÒÔºóµÄÈÕÆÚ£©£¬¸ºÖµ±íʾ¼õ£¨½á¹ûΪ >date ÒÔÇ°µÄÈÕÆÚ£©¡£
D £º´ý¼Ó¼õµÄÈÕÆÚ¡£
Àý×Ó£º DateAdd £¨ "m" , 1 , "31-Jan-98")
½á¹û£º 28-Feb-98
˵Ã÷£º½«ÈÕÆÚ 31-Jan-98 ¼ÓÉÏÒ»¸öÔ£¬½á¹ûΪ 28-Feb-98 ¶ø·Ç 31-Fe-98 ¡£
Àý×Ó£º DateAdd £¨ "d" , 20 , "30-Jan-99")
½á¹û£º 1999/2/9
˵Ã÷£º½«Ò»¸öÈÕÆÚ 30-Jan-99 ¼ÓÉÏ 20 ÌìºóµÄÈÕÆÚ¡£
DateDiff (I , D1 , D2[,FW[,FY]]) ¼ÆËãÁ½¸öÈÕÆÚÖ®¼äµÄÆڼ䡣
I £ºÉ趨Á½¸öÈÕÆÚÖ®¼äµÄÆÚ¼ä¼ÆËãÖ®µ¥Î»¡£Æ©Èç >I="m" ±íʾ¼ÆËãµÄµ¥Î»ÎªÔ¡£ >I µÄÉ趨ֵÈ磺
yyyy > Year Äê
q Quarter ¼¾
m Month ÔÂ
d Day ÈÕ
w Weekday ÐÇÆÚ
h Hour ʱ
m Minute ·Ö
s Second Ãë
D1 ,D2£º¼ÆËãÆÚ¼äµÄÁ½¸öÈÕÆÚ±í´ïʽ£¬Èô >date1 ½ÏÔ磬ÔòÁ½¸öÈÕÆÚÖ®¼äµÄÆÚ¼ä½á¹ûΪÕýÖµ£»Èô >date2 ½ÏÔ磬 Ôò½á¹ûΪ¸ºÖµ¡£
FW £ºÉ趨ÿÖܵÚÒ»ÌìΪÐÇÆÚ¼¸£¬ ÈôδÉ趨±íʾΪÐÇÆÚÌì¡£ >FW µÄÉ趨ֵÈçÏ£º
0 ʹÓà >API µÄÉ趨ֵ¡£
1 ÐÇÆÚÌì
2 ÐÇÆÚÒ»
3 ÐÇÆÚ¶þ
4 ÐÇÆÚÈý
5 ÐÇÆÚËÄ
6 ÐÇÆÚÎå
7 ÐÇÆÚÁù
FY £ºÉ趨һÄêµÄµÚÒ»ÖÜ£¬ ÈôδÉ趨Ôò±íʾһÔÂÒ»ÈÕÄÇÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ¡£ >FY µÄÉ趨ֵÈçÏ£º
0 ʹÓà >API µÄÉ趨ֵ¡£
1 Ò»ÔÂÒ»ÈÕÄÇÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
2 ÖÁÉÙ°üÀ¨ËÄÌìµÄµÚÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
3 °üÀ¨ÆßÌìµÄµÚÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
Àý×Ó£º DateDiff ("d","25-Mar-99 ","30-Jun-99 ")
½á¹û£º 97
˵Ã÷£ºÏÔʾÁ½¸öÈÕÆÚÖ®¼äµÄÆÚ¼äΪ 97 Ìì¡£
DatePart (I,D,[,FW[,FY]]) ´«»ØÒ»¸öÈÕÆÚµÄÖ®²¿·Ý¡£
>I £ºÉ趨´«»ØÄÇÒ»²¿·Ý¡£Æ©Èç >I="d" ±íʾ´«»Ø ²¿·ÝΪÈÕ¡£ >I µÄÉ趨ֵÈçÏ£º
yyyy Year Äê
q Quarter ¼¾
m Month ÔÂ
d Day ÈÕ
w Weekday ÐÇÆÚ
h Hour ʱ
m Minute ·Ö
s Second Ãë
D £º´ý¼ÆËãµÄÈÕÆÚ¡£
>FW £ºÉ趨ÿÖܵÚÒ»ÌìΪÐÇÆÚ¼¸£¬ ÈôδÉ趨Ôò±íʾΪÐÇÆÚÌì¡£ >FW µÄÉ趨ֵÈçÏ£º
0 ʹÓà >API µÄÉ趨ֵ¡£
1 ÐÇÆÚÌì
2 ÐÇÆÚÒ»>3 ÐÇÆÚ¶þ
4 ÐÇÆÚÈý
5 ÐÇÆÚËÄ
6 ÐÇÆÚÎå
7 ÐÇÆÚÁù
FY £ºÉ趨һÄêµÄµÚÒ»ÖÜ£¬ ÈôδÉ趨Ôò±íʾһÔÂÒ»ÈÕÄÇÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ¡£ >FY µÄÉ趨ֵÈçÏ£º
0 ʹÓà >API µÄÉ趨ֵ¡£
1 Ò»ÔÂÒ»ÈÕÄÇÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
2 ÖÁÉÙ°üÀ¨ËÄÌìµÄµÚÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
3 °üÀ¨ÆßÌìµÄµÚÒ»ÖÜΪһÄêµÄµÚÒ»ÖÜ
Àý×Ó£º DatePart ("m","25-Mar-99 ")
½á¹û£º 3
˵Ã÷£ºÏÔʾ´«»ØÒ»¸öÈÕÆÚ µÄÔ²¿·Ý¡£
Dateserial (year,month,day) ת»»(year,month,day) ³ÉÈÕÆÚ±äÁ¿ÐÍ̬¡£ Àý×Ó£º DateSerial (99,10,1)
½á¹û£º 1999/10/1
DateValue ( ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ ) ת»»³ÉÈÕÆÚ±äÁ¿ÐÍ̬£¬ÈÕÆÚ´Ó January 1,100 µ½ December 31,9999 ¡£¸ñʽΪ month,day,and year »ò month/day/year ¡£Æ©È磺 December 30,1999 ¡¢ Dec 30,1999 ¡¢ 12/30/1999 ¡¢ 12/30/99 Àý×Ó£º DateValue ("January 1,2002 ")
½á¹û£º 2002/1/1
Day( ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ ) ´«»ØÈÕÆڵġ¸ÈÕ¡¹²¿·Ý¡£ Àý×Ó£º Day(" 12/1/1999 ")
½á¹û£º 1
Fix( ±í´ïʽ ) ת»»×Ö·û´®³ÉÕûÊýÊý×ÖÐÍ̬¡£Óë Int º¯ÊýÏàͬ¡£ÈôΪ null ʱ´«»Ø null ¡£
Int (number) Óë Fix(number) µÄ²î±ðÔÚ¸ºÊý¡£Èç Int (-5.6)=-6 £¬ Fix(-5.6)=-5 ¡£
Àý×Ó£º Fix(5.6)
½á¹û£º 5
Hex( ±í´ïʽ ) ´«»ØÊýÖµµÄÊ®Áù½øÖÆÖµ¡£Èô±í´ïʽΪ null ʱ Hex( ±í´ïʽ )=null £¬Èô±í´ïʽ =Empty ʱ Hex( ±í´ïʽ )=0 ¡£ 16 ½øλ¿ÉÒÔ¼Ó¡¸ &H ¡¹±íʾ£¬Æ©Èç 16 ½øλ &H10 ±íʾʮ½øÖÆµÄ 16 ¡£ Àý×Ó£º Hex(30)
½á¹û£º 1E
Hour( ʱ¼äµÄ×Ö·û´®»ò±í´ïʽ ) ´«»Øʱ¼äµÄ¡¸Ð¡Ê±¡¹²¿·Ý¡£ Àý×Ó£º Hour("12:30:54 ")
½á¹û£º 12
InStr ([start,]string1,string2[,compare]) ½«Ò» ¸ö ×Ö·û´®ÓÉ×ó ¶øÓÒÓëÁíÒ»¸ö±È½Ï£¬´«»ØµÚÒ»¸öÏàͬµÄλÖá£
start Ϊ´ÓµÚ¼¸¸ö×ֱȽÏÆð£¬ÈôÊ¡ÂÔ start Ôò´ÓµÚÒ»¸ö×ֱȽÏÆ𣬠string1 Ϊ´ýÑ°ÕÒµÄ×Ö·û´®±í´ïʽ£¬ string2 Ϊ ´ý±È½ÏµÄ×Ö·û´®±í´ïʽ£¬ compare Ϊ±È½ÏµÄ·½·¨£¬ compare=0 ±í¶þ½øÖƱȽϷ¨£¬ compare=1 ±íÎÄ×ֱȽϷ¨£¬ÈôÊ¡ÂÔ compare ÔòΪԤÉèµÄ¶þ½øÖƱȽϷ¨¡£
Àý×Ó£º InStr("abc123def123","12")
½á¹û£º 4
InstrRev ([start,]string1,string2[,compare]) ½«Ò» ¸ö ×Ö·û´® ÓÉÓÒ¶ø×óÓëÁíÒ»¸ö±È½Ï£¬´«»ØµÚÒ»¸öÏàͬµÄλÖá£
start Ϊ´ÓµÚ¼¸¸ö×ֱȽÏÆð£¬ÈôÊ¡ÂÔ start Ôò´ÓµÚÒ»¸ö×ֱȽÏÆ𣬠string1 Ϊ´ýÑ°ÕÒµÄ×Ö·û´®±í´ïʽ£¬ string2 Ϊ ´ý±È½ÏµÄ×Ö·û´®±í´ïʽ£¬ compare Ϊ±È½ÏµÄ·½·¨£¬ compare=0 ±í¶þ½øÖƱȽϷ¨£¬ compare=1 ±íÎÄ×ֱȽϷ¨£¬ÈôÊ¡ÂÔ compare ÔòΪԤÉèµÄ¶þ½øÖƱȽϷ¨¡£
Àý×Ó£º InstrRev ("abc123def123","12")
½á¹û£º 10
Int ( ±í´ïʽ ) ´«»ØÒ»¸öÊýÖµµÄÕûÊý²¿·Ý¡£Óë Fix º¯ÊýÏàͬ¡£ Àý×Ó£º Int (5.6)
½á¹û£º 5
IsArray ( ±äÊý ) ²âÊÔ±äÁ¿ÊÇ (True) ·ñ (False) ÊÇÒ»¸öÊý×é¡£ Àý×Ó£º IsArray (3)
½á¹û£º False
˵Ã÷£º²»ÊÇÒ»¸öÊý×é¡£
IsDate ( ÈÕÆÚ»ò×Ö·û´®µÄ±í´ïʽ ) ÊÇ·ñ¿ÉÒÔת»»³ÉÈÕÆÚ¡£ÈÕÆÚ´Ó January 1,100 A.D. µ½ December 31,9999 A.D ¡£ Àý×Ó£º IsDate ("December 31,1999 ")
½á¹û£º True
˵Ã÷£º¿ÉÒÔת»»³ÉÈÕÆÚ¡£
IsEmpty ( ±äÊý ) ²âÊÔ±äÁ¿ÊÇ (True) ·ñ (False) ÒѾ­±»³õʼ»¯ Àý×Ó£º IsEmpty (a)
½á¹û£º True
IsNull ( ±äÊý ) ²âÊÔ±äÊýÊÇ (True) ·ñ (False) ²»ÊÇÓÐЧµÄÊý¾Ý¡£ Àý×Ó£º IsNull ("")
½á¹û£º False
˵Ã÷£ºÊÇÓÐЧµÄÊý¾Ý¡£
IsNumeric ( ±í´ïʽ ) ÊÇ (True) ·ñ (False) ÊÇÊý×Ö¡£ Àý×Ó£º IsNumeric ("abc123")
½á¹û£º False
˵Ã÷£º²»ÊÇÊý×Ö¡£
LCase ( ×Ö·û´®±í´ïʽ ) ת»»×Ö·û´®³ÉСд¡£½«´óд×ÖĸµÄ²¿·Ýת»»³ÉСд¡£×Ö·û´®ÆäÓàµÄ²¿·Ý²»±ä¡£ Àý×Ó£º LCase ("ABC123")
½á¹û£º abc123
Left( ×Ö·û´®±í´ïʽ ,length) È¡×Ö·û´®×ó±ßµÄ¼¸¸ö×Ö¡£ length Ϊȡ¸ö×Ö¡£ Len º¯Êý¿ÉµÃÖª×Ö·û´®µÄ³¤¶È¡£ Àý×Ó£º Left("ABC123",3)
½á¹û£º ABC
Len( ×Ö·û´®±í´ïʽ ±äÁ¿ ) È¡µÃ×Ö·û´®µÄ³¤¶È¡£ Àý×Ó£º Len("ABC123")
½á¹û£º 6
LTrim ( ×Ö·û´®±í´ïʽ ) ³ýÈ¥×Ö·û´®×ó±ßµÄ¿Õ°××Ö¡£ RTrim ³ýÈ¥×Ö·û´®ÓұߵĿհ××Ö£¬ Trim º¯Êý³ýÈ¥×Ö·û´®×óÓÒÁ½±ßµÄ¿Õ°××Ö¡£ Àý×Ó£º LTrim ("456+" abc ")
½á¹û£º 456abc123
Mid( ×Ö·û´®±í´ïʽ ,start[,length]) È¡×Ö·û´®Öеļ¸¸ö×Ö¡£ start Ϊ´ÓµÚ¼¸¸ö ×ÖÈ¡Æ𣬠length Ϊȡ¼¸¸ö×Ö£¬ ÈôÂÔ length Ôò´Ó start È¡µ½×îÓҵס£ÓÉLen º¯Êý¿ÉµÃÖª×Ö·û´®µÄ³¤¶È¡£ Àý×Ó£º Mid("abc123",2,3)
½á¹û£º c12
Minute( ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ ) ´«»Øʱ¼äµÄ¡¸·ÖÖÓ¡¹²¿·Ý¡£ Àý×Ó£º Minute("12:30:54")
½á¹û£º30
Month(ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ) ´«»ØÈÕÆڵġ¸Ô¡¹²¿·Ý¡£ Àý×Ó£ºMonth("12/1/2001")
½á¹û£º12
MonthName(month[,abbreviate]) ´«»ØÔµÄÃû³Æ¡£
month £º´ý´«»ØÔÂÃû³ÆµÄÊý×Ö 1~12 ¡£Æ©È磬 1 ´ú±íÒ»Ô£¬ 7 ´ú±íÆßÔ¡£
abbreviate: ÊÇ (True) ·ñ (False) ΪËõд£¬Æ©Èç March £¬ËõдΪ Mar ¡£Ä¬ÈÏֵΪ False ¡£ÖÐÎĵÄÔÂÃû³ÆÎÞËõд¡£
Àý×Ó£º MonthName (7)
½á¹û£ºÆßÔÂ
Now() ´«»ØϵͳµÄÈÕÆÚʱ¼ä¡£ Àý×Ó£º Now()
½á¹û£º 2001/12/30 10:35:59 AM
Oct() ´«»ØÊýÖµµÄ°Ë½øλֵ¡£°Ë½øλ¿ÉÒÔ¼Ó¡¸ &O ¡¹±íʾ£¬Æ©Èç°Ë½øλ &O10 ±íʾʮ½øÖÆµÄ 8 ¡£ Àý×Ó£º Oct(10)
½á¹û£º 12
Replace( ×Ö·û´®±í´ïʽ,findnreplacewith[,start[,count[,compare]]]) ½«Ò»¸ö×Ö·û´®È¡´ú ²¿·Ý×Ö¡£Ñ°ÕÒ´ýÈ¡´úµÄÔ­×Ö·û´® (find) £¬ ÈôÕÒµ½Ôò±»È¡´úΪÐÂ×Ö·û´® (replacewith) ¡£
find £º´ýÑ°ÕÒÈ¡´úµÄÔ­×Ö·û´®¡£
replacewith £ºÈ¡´úºóµÄ×Ö¡£
start £º´ÓµÚ¼¸¸ö×Ö¿ªÊ¼Ñ°ÕÒÈ¡´ú£¬ ÈôδÉ趨ÔòÓɵÚÒ»¸ö×Ö¿ªÊ¼Ñ°ÕÒ¡£
count £ºÈ¡´úµÄ´ÎÊý¡£ ÈôδÉ趨ÔòËùÓÐÑ°ÕÒµ½µÄ×Ö·û´®È¡´ú×Ö·û ´®È«²¿±»È¡´ú¡£
compare £ºÑ°ÕұȽϵķ½·¨£¬ compare=0 ±íʾ¶þ½øÖƱȽϷ¨£¬ compare=1 ±íÎÄ×ֱȽϷ¨£¬ compare =2 ±í¸ù¾Ý±È½ÏµÄ Êý¾ÝÐÍ̬¶ø¶¨£¬ÈôÊ¡ÂÔ compare ÔòΪԤÉèµÄ¶þ½øÖƱȽϷ¨¡£
Àý×Ó£º Replace("ABCD123ABC","AB","ab")
½á¹û£º abCD123abC
Right( ×Ö·û´®±í´ïʽ ,length) È¡×Ö·û´®Óұߵļ¸¸ö×Ö£¬ length Ϊȡ¼¸¸ö×Ö¡£ Len º¯Êý¿ÉµÃÖª×Ö·û´®µÄ³¤¶È¡£ Àý×Ó£º Right("ABC123",3)
½á¹û£º 123
Rnd [(number)] 0~1 µÄ Ëæ»úËæ»úÊýÖµ¡£ number ÊÇÈκÎÓÐЧµÄÊýÖµ±í´ïʽ¡£Èô number СÓÚ 0 ±íʾÿ´ÎµÃµ½ÏàͬµÄ Ëæ»úËæ»úÊýÖµ¡£ number ´óÓÚ 0 »òδÌṩʱ±íʾÒÀÐòµÃµ½ÏÂÒ»¸ö Ëæ»úËæ»úÊýÖµ¡£ >number=0 ±íʾµÃµ½×î½ü²úÉúµÄ Ëæ»úËæ»úÊýÖµ¡£ÎªÁ˱ÜÃâµÃµ½ÏàͬµÄËæ»úËæ»úÊý˳Ðò£¬¿ÉÒÔÓÚ Rnd º¯ÊýÇ°¼Ó Randomize ¡£ Àý×Ó£º Rnd
½á¹û£º 0.498498
Round( ÊýÖµ±í´ïʽ [,D]) ËÄÉáÎåÈë¡£
D £ºÎªËÄÉáÎåÈëµ½µÚ¼¸Î»Ð¡Êý£¬ÈôÊ¡ÂÔÔòËÄÉáÎåÈëµ½ÕûÊý¡£
Àý×Ó£º Round(30635,1)
½á¹û£º 3.6
RTrim ( ×Ö·û´®±í´ïʽ ) ³ýÈ¥×Ö·û´®ÓұߵĿհ××Ö¡£ LTrim ³ýÈ¥×Ö·û´®×ó±ßµÄ¿Õ°××Ö£¬ Trim º¯Êý³ýÈ¥×Ö·û´®×óÓÒÁ½±ßµÄ¿Õ°××Ö¡£ Àý×Ó£º RTrim ("abc123 ")+"456"
½á¹û£º abc123456
Second( ʱ¼äµÄ×Ö·û´®»ò±í´ïʽ ) ´«»Øʱ¼äµÄ¡¸Ã롹²¿·Ý¡£ Àý×Ó£ºSecond("12:30:54")
½á¹û£º54
Space( Öظ´´ÎÊý ) µÃµ½Öظ´ÏàͬµÄ¿Õ°××Ö·û´®¡£ Àý×Ó£º A"+Space (5)+"B
½á¹û£º A B
˵Ã÷£º A ºÍ B Öмä¼ÓÈëÎå¸ö¿Õ°××Ö¡£
String( Öظ´´ÎÊý£¬´ýÖظ´µÄ×Ö ) µÃµ½Öظ´ÏàͬµÄ×Ö·û´®¡£ Àý×Ó£º String(5,71)
½á¹û£º GGGGG
StrReverse (String(10,71)) ½«Ò»¸ö×Ö·û´®Ë³Ðòµßµ¹¡£ Àý×Ó£º StrReverse ("ABC")
½á¹û£º CBA
Time() ´«»ØϵͳµÄʱ¼ä¡£ Àý×Ó£º Time
½á¹û£º 10:35:59 PM
TimeSerial (hour,minute,second) ת»»Ö¸¶¨µÄ ( hour,minute,second) ³Éʱ¼ä ±äÁ¿ÐÍ̬¡£ Àý×Ó£º TimeSerial (10,31,59)
½á¹û£º 10:31:59
TimeValue ( ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ ) ת»» ³Éʱ¼ä±äÁ¿ÐÍ̬¡£ÈÕÆÚµÄ×Ö·û´®»ò±í´ïʽ´Ó 0:00:00(12:00:00 A.M.) µ½ 23:59:59(11:59:59 P.M.) ¡£ Àý×Ó£º TimeValue (" 11:59:59 ")
½á¹û£º 11:59:59
Trim( ×Ö·û´®±í´ïʽ ) ³ýÈ¥×Ö·û´®×óÓÒÁ½±ßµÄ¿Õ°××Ö¡£ Àý×Ó£º Trim(" abc123 ")
½á¹û£º abc123
UCase () ת»»×Ö·û´®³É´óд¡£½«Ð¡Ð´×ÖĸµÄ²¿·Ýת»»³É´óд£¬×Ö·û´®ÆäÓಿ·Ý²»±ä¡£ Àý×Ó£º UCase ("abc123")
½á¹û£º ABC123
VarType ( ±äÊý ) ´«»ØÒ»¸ö±äÁ¿ÀàÐÍ¡£Óë TypeName º¯ÊýÏàͬ£¬ VarType ´«»Ø±äÁ¿ÀàÐ͵ĴúÂ룬 TypeName ´«»Ø±äÁ¿ÀàÐ͵ÄÃû³Æ¡£ Àý×Ó£º VarType ( "I love you!")
½á¹û£º 8
Weekday( ÈÕÆÚ±í´ïʽ ,[FW]) ´«»ØÐÇÆÚ¼¸µÄÊý×Ö¡£
FW £ºÉ趨һÖܵĵÚÒ»ÌìÊÇÐÇÆÚ¼¸¡£Èô Ê¡ÂÔÔò±í 1( ÐÇÆÚÈÕ ) ¡£
Firstdayfweek É趨ֵΪ£º 1( ÐÇÆÚÈÕ ),2( ÐÇÆÚÒ» ),3( ÐÇÆÚ¶þ ),4( ÐÇÆÚÈý ),5( ÐÇÆÚËÄ ),6( ÐÇÆÚÎå ),7( ÐÇÆÚÁù ) ¡£
Àý×Ó£º Weekday(" 1/1/2000")
½á¹û£º 7
WeekDayName (W,A,FW) ´«»ØÐÇÆÚ¼¸µÄÃû³Æ¡£
W £ºÊÇ (True) ·ñ (False) ΪËõд¡£Æ©Èç March £¬ËõдΪ Mar ¡£Ô¤ÉèΪ False ¡£ÖÐÎĵÄÐÇÆÚ¼¸Ãû³ÆÎÞËõд¡£
FW £ºÉ趨һÖܵĵÚÒ»ÌìÊÇÐÇÆÚ¼¸¡£ ÈôÊ¡ÂÔ±í 1( ÐÇÆÚÈÕ ) ¡£É趨´ý´«»ØÐÇÆÚ¼¸µÄÃû³Æ£¬ÎªÒ»ÖÜÖеĵڼ¸Ìì¡£
A £º 1( ÐÇÆÚÈÕ ),2( ÐÇÆÚÒ» ),3( ÐÇÆÚ¶þ ),4( ÐÇÆÚÈý ),5( ÐÇÆÚËÄ ),6( ÐÇÆÚÎå ),7( ÐÇÆÚÁù ) ¡£
Àý×Ó£º WeekDayName ("1/1/2000")
½á¹û£ºÐÇÆÚÁù
Year() ´«»ØÈÕÆڵġ¸Ä꡹²¿·Ý¡£ Àý×Ó£º Year(" 12/1/2000 ")
½á¹û£º 2000

©2008 - 2021 °æȨËùÓÐ 51²éѯÍø

·µ»ØÖ÷Ò³ - 51²éѯ´óÈ«

·µ»Ø¶¥²¿
2021-11-8