牛 牛龙 Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-05 #1 paradox数据库中TDateTimeField类型的域,我要给它赋值,但是从date函数只得到date值,time函数只得到time值,我如何同时得到一个既有date又有time值的一个值,将它赋值给TDateTimeField类型的域呐?
paradox数据库中TDateTimeField类型的域,我要给它赋值,但是从date函数只得到date值,time函数只得到time值,我如何同时得到一个既有date又有time值的一个值,将它赋值给TDateTimeField类型的域呐?
A Another_eYes Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-05 #2 now函数 function Now: TDateTime; Description Returns the current date and time, corresponding to Date + Time.
now函数 function Now: TDateTime; Description Returns the current date and time, corresponding to Date + Time.
C CJ Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-05 #3 filedbyname{'xx'}.AsDatetime := formatdatetime(...);
D delphi fan2 Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-05 #4 delphi 又Tdatetime类型! TDateTimeField也又datetime属性!
N nickname Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-08 #5 你如果是要当前的日期和时间就用now, 如果是要其他的就自己拼.
C CJ Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-08 #7 如果NOW更简单 filedbyname{'xx'}.AsDatetime := NOW; 上面错了,应该是: filedbyname{'xx'}.AsDatetime := DateTimeToString(...);
如果NOW更简单 filedbyname{'xx'}.AsDatetime := NOW; 上面错了,应该是: filedbyname{'xx'}.AsDatetime := DateTimeToString(...);
H huizhang Unregistered / Unconfirmed GUEST, unregistred user! 1999-02-09 #8 function EncodeDate(Year, Month, Day: Word): TDateTime; 例如: var MyDate: TDateTime; begin MyDate := EncodeDate(99, 2, 9); Label1.Caption := DateToStr(MyDate); end;
function EncodeDate(Year, Month, Day: Word): TDateTime; 例如: var MyDate: TDateTime; begin MyDate := EncodeDate(99, 2, 9); Label1.Caption := DateToStr(MyDate); end;