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

DelphiÈÕÆÚº¯Êý

ËùÔÚµ¥Ôª£º DateUtils
Day ¿ªÍ·µÄº¯Êý
1¡¢DayOf()
ÃèÊö£º ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£ ÀýÈ磺 showmessage(DateTimetostr(dateof(now()))); ÄãµÃµ½µÄÊÇ 2003/03/19 ¶ø showmessage(DateTimetostr((now()))); µÃµ½µÄÊÇ
2¡¢DateTimeTostr()
ÃèÊö£º DateTimeToString º¯Êý½« TDateTime ÀàÐ͵IJÎÊý DateTime ת»»³ÉÒ»¸ö ×Ö·û´®£¬Ê¹Óøø¶¨µÄÈ«¾Ö±äÁ¿ ShortDateFormat µÄ¸ñʽ£¬Ê±¼ä²¿·Ö°´ÕÕ ¸ø¶¨µÄÈ«¾Ö±äÁ¿ LongTimeFormat µÄ¸ñʽ¡£ ÆäÖÐ DateTime ΪÁãµÄ²¿·Ö½«²»»áÏÔʾ³öÀ´¡£ ÀýÈ磺 ShortDateFormat:=’yyyy mm dd’; showmessage(DateTimetostr((now()))); Ä㽫µÃµ½£º2003
3¡¢DateTimeToString
ÃèÊö£º DateTimeToString ·½·¨½«TDateTimeÀàÐ͵IJÎÊýDateTime °´ÕÕÓɲÎÊýFormatÌṩµÄ¸ñʽ ת»¯³É×Ö·û´®£¬²¢±£´æÔÚResultÖС£ ¶ÔÓÚFormatµÄ¸ñʽÀàÐÍ£¬Çë¿´ Date-Time format strings µÄ°ïÖú¡£ ÀýÈ磺 DateTimeToString(result,’yyyy mm dd’,now()); ÄÇô resultµÄ½á¹ûΪ£º2003
4¡¢DateTimeToSystemTime ()
ÃèÊö£º ÓÐʱΪÁ˵÷ÓÃAPIº¯ÊýÀ´Ê¹ÓÃϵͳʱ¼ä£¬Äã¿ÉÒÔʹÓà DateTimeToSystemTime ·½·¨£¬À´½«Ò»¸ö TDateTime ÀàÐ͵Äʱ¼ä±äÁ¿×ª»»³ÉÒ»¸ö TSystemTime ÀàÐÍµÄ ÏµÍ³Ê±¼ä¡£
5¡¢DateTimeToUnix ()
ÃèÊö£º ʹÓà DateTimeToUnix º¯ÊýÀ´½«Ò»¸ö TDateTime ÐÍʱ¼ä±äÁ¿×ª»»³ÉÒ»¸öÏàÓ¦µÄ Unix ¸ñʽ µÄÈÕÆÚºÍʱ¼ä¡£
6¡¢DateToStr£¨£©
ÃèÊö£º ʹÓà DateToStr º¯ÊýÄܵõ½ TDateTime ÈÕÆÚʱ¼äÀàÐ͵ÄÈÕÆÚ²¿·Ö¡£ÈÕÆÚµÄת»»¸ñʽÒÀÀµÓÚ È«¾Ö±äÁ¿ ShortDateFormat¡£
7¡¢DayOf ÓëDayOfTheMonth
ÃèÊö£º ¶ÔÓÚ¸ø¶¨µÄTDateTimeÀàÐ͵ÄÈÕÆÚʱ¼ä£¬Ê¹Óà DayOf º¯ÊýÄܵõ½¸ÃÈÕÆÚÊǸÃÔ·ݵĵڼ¸Ìì¡£ ¸Ãº¯ÊýµÄ·µ»ØÊýÖµÔÚ 1 µ½ 31 Ö®¼ä ×¢Ò⣺DayOf º¯ÊýµÃµ½µÄ½á¹ûÓë DayOfTheMonth Ïàͬ¡£ ÀýÈ磺 showmessage(inttostr(dayof(now))); µÃµ½µÄÊÇ£º19 £¨½ñÌìÊÇ Ä³ÔÂ19ÈÕ£© Óë DayOf Ïàͬ¡£
8¡¢DayOfTheWeek
ÃèÊö£º ¶ÔÓÚ¸ø¶¨µÄTDateTimeÀàÐ͵ÄÈÕÆÚʱ¼ä£¬Ê¹Óà DayOfTheWeek º¯ÊýÄܵõ½¸ÃÈÕÆÚÊǸÃÐÇÆÚµÄ µÚ¼¸Ìì¡£DayOfTheWeek º¯ÊýµÄ·µ»ØÊýֵΪ 1 µ½ 7£¬ÆäÖÐ 1 ±íʾÐÇÆÚÒ»£¬¶ø 7 ±íʾÐÇÆÚÈÕ¡£ ×¢Ò⣺DayOfTheWeek ÊÇ ISO 8601 ±ê×¼µÄ£¨´Ë±ê׼Ϊ ÐÇÆÚÒ»ÊÇÒ»ÖܵĵÚÒ»Ì죩¡£¶ÔÓÚÒ»ÖÜ µÄµÚÒ»ÌìÊÇÐÇÆÚÈյıê×¼£¬Èç¹ûÏë»ñµÃÐÇÆÚÊý£¬ÇëʹÓà DayOfWeek º¯Êý¡£
9¡¢DayOfTheYear
ÃèÊö£º ¸ù¾Ý¸ø¶¨µÄ


Ïà¹ØÎĵµ£º

delphiµÄÈ¡Õûº¯Êýround¡¢trunc¡¢ceilºÍfloor

1.Round£¨ËÄÉáÁùÈëÎåÁôË«£©
¹¦ÄÜ˵Ã÷£º¶ÔÒ»¸öʵÊý½øÐÐËÄÉáÎåÈë¡£(°´ÕÕÒøÐмÒËã·¨)
Àý£º
var
i, j: Integer;
begin
i := Round(1.5); // iµÈÓÚ2
j := Round(2.5); // jµÈÓÚ2
end;
ÔÚDelphiÖÐʹÓÃRoundº¯ÊýµÃµ½µÄ´ð°¸ÓÐʱÓëÎÒÃÇËùÔ¤ÆڵĻ᲻̫һÑù£º²ÉÓõÄÊÇËÄÉáÁùÈëÎåÁôË«¡£¼´µ±Éá»òÈëλ´óÓÚ»òСÓÚÎåÊ ......

Delphiµ÷ÓÃoutlook

 //¶¨ÒåÈ«¾Ö±äÁ¿
public
{ Public declarations }
outlook,MailItem,Recipient:variant;
OutlookNameSpace:variant;
OutlookFolder:variant;
OutlookAttachment:variant;
//´´½¨´ò¿ªoutlook
procedure TForm1.CreateOutLook;
begin
try
outlook:=CreateOleObject('OutLook.app ......

DelphiµÄ5ÖÖ·½·¨ÀàÐÍ

DelphiµÄ·½·¨ÀàÐÍÓУº
1.¾²Ì¬·½·¨ (Static) ĬÈÏÀàÐÍ£¬¿ÉÒÔÊ¡ÂԹؼü×Ö
2.ÐéÄâ·½·¨ (Virtual)
3.¶¯Ì¬·½·¨ (Dynamic)
4.ÏûÏ¢·½·¨ (Message)
5.³éÏó·¨·½ (Abstract)
=======================================================
1£©¾²Ì¬·½·¨[static]
¾²Ì¬·½·¨ÀàËÆÓÚͨ³£µÄ¹ý³ÌºÍº¯Êý£¬±àÒëÆ÷ÔÚ±àÒëʱ¾ÍÒÑÖ¸¶¨ÁËÊä³ö¸Ã·½· ......

DelphiÎļþ²Ù×÷³£Óú¯Êý

====================================================
Delphi²Ù×÷ÎļþµÄÒ»°ã²½Ö裺
1£©¹ØÁªÎļþ£º
 AssignFile(var F; FileName :string)£»
2£©³õʼ»¯Îļþ£º
 Append(var F :Text);   
 //ֻд£¬ÓÚÎļþ×îºó×·¼ÓÊý¾Ý
 Reset(var F [; RecSize :Word]);     ......

Êý×Öת»»´óдÈËÃñ±ÒµÄdelphiʵÏÖ

ÎÄÕÂÀ´Ô´£ºIT¹¤³ÌÐÅÏ¢Íø  http://www.systhinker.com/html/09/n-12309.html
֮ǰÓÃAccess×÷Ò»¸öÓ¦Ó㬵«ÕÒ²»µ½»õ±Òת»»³É´óдÈËÃñ±ÒµÄ¹¦ÄÜ£¨µ±È»¿ÉÒÔͨ¹ýexcel ת»»£¬µ«²»ÔÚÒ»¸öÓ¦ÓÃÉÏ£¬·ÅÆú£©¡£ÒÔΪ±È½Ï¼òµ¥£¬×Ô¼ºÊÔд£¬Ë­ÖªÓÃÁËÁ½¸öÍíÉÏ£¬²Å»ù±¾ÊµÏÖ£¬µ«Ã»ÓÐСÊýµã£¨Ôª£©ÒÔÏ»õ±ÒµÄת»»¡£Ò²Ã»ÓÐÕ×µÄÅжϡ£¶øÇÒ¶Ô×Ö· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ