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

delphiÈÕÆÚº¯Êý


  
Day ¿ªÍ·µÄº¯Êý
¡ñ
Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
ÃèÊö
ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö
Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£
ÀýÈ磺
showmessage(DateTimetostr(dateof(now())));
ÄãµÃµ½µÄÊÇ 2003/03/19
¶ø showmessage(DateTimetostr((now())));
µÃµ½µÄÊÇ 2003/03/19 10:50:49
¡ñfunction DateTimeToStr(DateTime: TDateTime): string;
ÃèÊö
DateTimeToString º¯Êý½« TDateTime ÀàÐ͵IJÎÊý DateTime ת»»³ÉÒ»¸ö
×Ö·û´®£¬Ê¹Óøø¶¨µÄÈ«¾Ö±äÁ¿ ShortDateFormat µÄ¸ñʽ£¬Ê±¼ä²¿·Ö°´ÕÕ
¸ø¶¨µÄÈ«¾Ö±äÁ¿ LongTimeFormat µÄ¸ñʽ¡£
ÆäÖÐ DateTime ΪÁãµÄ²¿·Ö½«²»»áÏÔʾ³öÀ´¡£
ÀýÈ磺
ShortDateFormat:=’yyyy mm dd’;
showmessage(DateTimetostr((now())));
Ä㽫µÃµ½£º2003 03 19 10:50:49
¡ñprocedure DateTimeToString(var Result: string; const Format: string; DateTime: TDateTime);
ÃèÊö£º
DateTimeToString ·½·¨½«TDateTimeÀàÐ͵IJÎÊýDateTime °´ÕÕÓɲÎÊýFormatÌṩµÄ¸ñʽ
ת»¯³É×Ö·û´®£¬²¢±£´æÔÚResultÖС£
¶ÔÓÚFormatµÄ¸ñʽÀàÐÍ£¬Çë¿´ Date-Time format strings µÄ°ïÖú¡£
ÀýÈ磺
DateTimeToString(result,’yyyy mm dd’,now());
ÄÇô resultµÄ½á¹ûΪ£º2003 03 19 10:50:49
¡ñprocedure DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime);
ÃèÊö£º
ÓÐʱΪÁ˵÷ÓÃAPIº¯ÊýÀ´Ê¹ÓÃϵͳʱ¼ä£¬Äã¿ÉÒÔʹÓà DateTimeToSystemTime ·½·¨£¬À´½«Ò»¸ö
TDateTime ÀàÐ͵Äʱ¼ä±äÁ¿×ª»»³ÉÒ»¸ö TSystemTime ÀàÐÍµÄ ÏµÍ³Ê±¼ä¡£
¡ñfunction DateTimeToUnix(const Avalue: TDateTime ): Int64;
ÃèÊö£º
ʹÓà DateTimeToUnix º¯ÊýÀ´½«Ò»¸ö TDateTime ÐÍʱ¼ä±äÁ¿×ª»»³ÉÒ»¸öÏàÓ¦µÄ Unix ¸ñʽ
µÄÈÕÆÚºÍʱ¼ä¡£
Unix date-and-time values are encoded as the number of seconds that have elapsed
since midnight at the start of January 1, 1970.
¡ñfunction DateToStr(Date: TDateTime): string;
ÃèÊö£º
ʹÓà DateToStr º¯ÊýÄܵõ½ TDateTime ÈÕÆÚʱ¼äÀàÐ͵ÄÈÕÆÚ²¿·Ö¡£ÈÕÆÚµÄת»»¸ñʽÒÀÀµÓÚ
È«¾Ö±äÁ¿ ShortDateFormat¡£
¡ñfunction DayOf(const Avalue: TDateTime): Word;
ÃèÊö£º
¶ÔÓÚ¸ø¶¨µÄTDateTimeÀàÐ͵ÄÈÕÆÚʱ¼ä£¬Ê¹Óà DayOf º¯ÊýÄܵõ½¸ÃÈÕÆÚÊǸÃÔ·ݵĵڼ¸Ìì¡£
¸Ãº¯ÊýµÄ·µ»ØÊýÖµÔÚ 1


Ïà¹ØÎĵµ£º

Ò»¸ö·½±ãÓÐÓõÄDelphiÊý¾Ý¿â²Ù×÷Àà(ת)

unit MyADO;
interface
uses
SysUtils, Classes,ADODB,DB,Variants,StdCtrls,Dialogs;
type
TMyADO = class(TComponent)
    private
    Connection: TADOConnection;
    Query: TADOQuery;
    Table: TADOTable;
    FConnectio ......

Delphi±í´ïʽ

function ExpCalc(exp: string): string;
var
vScript: Variant;
begin
vScript := CreateOleObject('ScriptControl');
vScript.Language := 'VBScript';
Result := vScript.Eval(exp);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
begin
s:=ExpCalc('100 *4.17/0.5*(55. ......

Delphiº¯ÊýºÍ¹ý³Ì

     ¹ý³ÌÎÞ·µ»ØÖµ£¬º¯ÊýÓзµ»ØÖµ¡£
     procedure MyProc(m,n : Integer; o : String; p : Single = 2.5; q : String = 'Delphi');
     ÈçÉÏÀýËùʾ£¬¹ý³ÌÉùÃ÷ºÍ¶¨ÒåÖУ¬¶à¸ö²ÎÊýÊÇÓ÷ֺŸô¿ªµÄ£¬µ«ÔÚµ÷ÓÃʱÊÇÓöººÅ¸ô¿ªµÄ ¡£eg£º
  ......

Delphi formatµÄÓ÷¨

Ò»¡¢Formatº¯ÊýµÄÓ÷¨
FormatÊÇÒ»¸öºÜ³£Óã¬È´ÓÖËƺõºÜ·³µÄ·½·¨£¬±¾ÈËÊÔͼ¶ÔÕâ¸ö·½·¨µÄ°ïÖú½øÐÐһЩ·­Ò룬ÈÃËüÓÐÒ»¸öÍêÕûµÄ¸Åò£¬ÒÔ¹©´ó¼Ò²éѯ֮Óãº
Ê×ÏÈ¿´ËüµÄÉùÃ÷£º
function Format(const Format: string; const Args: array of const): string; overload;
ÊÂʵÉÏFormat·½·¨ÓÐÁ½¸öÖÖÐÎʽ£¬ÁíÍâÒ»ÖÖÊÇÈý¸ö²ÎÊýµÄ£¬Ö ......

DelphiµÄSocket±à³ÌÒª·Ö¼¸²½£¿

DelphiµÄSocket±à³ÌÒª·Ö¼¸²½£¿
2008-12-20 02:03:24
¡¡±êÇ©£ºDelphi Socket ±à³Ì¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ]
ClientSocket ºÍServerSocket
¼¸¸öÖØÒªµÄÊôÐÔ:   
1.clientºÍserver¶¼ÓÐportÊôÐÔ£¬ÐèÒªÒ»Ö²ÅÄÜ»¥ÏàͨÐÅ   
2.clientÓÐAddressÊôÐÔ,ʹÓÃʱÌîд¶Ô·½(server)µÄIPµØÖ·  & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ