DelphiFAQ Home Search:
General :: Databases :: InterBase
Help with InterBase, Borland's open source database.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Current date / time in InterBase

Question:

How can I determine the current date / time in InterBase? (Version 5.0)


Answer:

InterBase supports four DATE literals. They are: 'today', 'yesterday', 'tomorrow' and 'now'
Use it with a cast as shown in the example below.

insert into mytable 
 (TIME_FIELD, MESSAGE_FIELD)
 values(cast('now' as DATE), 'Test')

Generated 0:00:27 on Sep 21, 2018