delphi ϵÄÈÕÆÚ¼ÆËã
ÔÚÏîÄ¿ÖУ¬ÐèÒª×öÒ»¸öÈÕÆÚµÄÌáÐѹ¦ÄÜ£¬Í¦ÓôÃƵģ¬¶ÔÈÕÆڵļÆËã:
ºÜÐÒÔ˵ÄÊÇÔÚdelphi ÖÐÓÐÏÖÓеļÆË㺯Êý£¬DateUtilsµ¥Ôª£»
·¾¶:*\Delphi7\Source\Rtl\Common Ŀ¼Ï¡£
Ìù³öÒ»²¿·Ö:
function IncYear(const AValue: TDateTime;
const ANumberOfYears: Integer = 1): TDateTime;
// function IncMonth is in SysUtils
function IncWeek(const AValue: TDateTime;
const ANumberOfWeeks: Integer = 1): TDateTime;
function IncDay(const AValue: TDateTime;
const ANumberOfDays: Integer = 1): TDateTime;
function IncHour(const AValue: TDateTime;
const ANumberOfHours: Int64 = 1): TDateTime;
function IncMinute(const AValue: TDateTime;
const ANumberOfMinutes: Int64 = 1): TDateTime;
function IncSecond(const AValue: TDateTime;
const ANumberOfSeconds: Int64 = 1): TDateTime;
function IncMilliSecond(const AValue: TDateTime;
const ANumberOfMilliSeconds: Int64 = 1): TDateTime;
²Î¿¼µØÖ·:http://info.52z.com/html/24801.html
Ïà¹ØÎĵµ£º
Delphi Êý¾ÝÀàÐÍÁбí
·ÖÀà
·¶Î§
×Ö½Ú
±¸×¢
¼òµ¥ÀàÐÍ
ÐòÊý
ÕûÊý
Integer
-2147483648 .. 2147483647
4
ÓзûºÅ32λ
Cardinal
0 .. 4294967295
4
ÎÞ·ûºÅ32λ
Shortint
-128 .. 127
1
ÓзûºÅ8λ
Smallint
-32768 .. 32767
2
ÓзûºÅ16λ
Longint
-2147483648 .. 2147483647
4
ÓзûºÅ32λ
Int64
- ......
procedure Delay(msecs:integer);
var
Tick: DWord;
Event: THandle;
begin
Event := CreateEvent(nil, False, False, nil);
try
Tick := GetTickCount + DWord(msecs);
while (msecs > 0) and (MsgWaitForMultipleObjects(1, Event, False, msecs, QS_ALLINPUT) <&g ......
¶¨Ò壺
CbName: TComboBox;
width: Integer; //ʵ¼ÊËùÐèµÄ¿í¶È
ÔÚÖ´ÐдúÂëÖа´ÈçÏ·½·¨Ð´£º
width := CbName.Canvas.TextWidth(CbName.Items[I]); //¿ÉÓô˷½·¨Í¨¹ý±éÀú»ñµÃijѡÏîµÄ×î´ó¿í¶È£¬Ò²¿ÉÒÔ°´×Ô¼ºµÄÐ ......
ÓÉÓÚÐèÒªÔÚ´°ÌåÖÐÉ趨һ¸öÈÕÆÚʱ¼ä£¬³öȥͨÓÃÐÍ¿¼ÂÇ£¬²ÉÓÃÁËTDateTimePicker¿Ø¼þ¡£
ÒòΪÕâ¸ö¿Ø¼þµÄĬÈÏ״ֻ̬ÄÜÏÔʾÈÕÆÚ£¬Ôì³ÉʹÓÃÉϵIJ»±ã£¬ËùÒÔÐèÒª×öÈçϵÄÉ趨£º
ÔڿؼþµÄformatÊôÐÔÀ¸ÀïÉèÖÃÈçÏÂÖµ£ºyyyy-mm-dd hh:mm:ss£»
É趨Íê³ÉºóµÄʱ¼äΪµ±Ç°µÄϵͳʱ¼ä£¬²»ÄÜͨ¹ýµ¯³öÈÕÀúÉ趨£¬Ö»ÄÜÔÚÎı¾¿òÖÐÉ趨¡£ ......