Delphi .NET (2) Database (72) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (243)
Exchange Links About this site Links to us
|
Today's date on database server
This article has not been rated yet. After reading, feel free to leave comments and rate it.
This is another case where ORACLE and InterBase SQL dialects are different.
In ORACLE, it is SYSDATE,
in InterBase, it is TODAY.
 | |  | |
if AppLibrary.Database.DriverName = 'ORACLE' then
SQL.Add ('and entry_date < SYSDATE')
else
SQL.Add ('and entry_date < "TODAY"');
end;
select to_char(sysdate, 'DD-Mon-YYYY HH24:MI:SS') as "Current Time" from MyTable; | |  | |  |
Comments:
|