DelphiFAQ Home Search:

Current date / time in InterBase

 

comments4 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

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')

Content-type: text/html

Comments:

2006-02-23, 05:54:38
malmosi@freemail.hu from Hungary  
It also works:

insert into mytable(time_field, message_field)
values(current_time,'Test')

other functions:

current_date, current_timestamp
2006-06-28, 15:53:14
anonymous from Brazil  
rating
2008-10-14, 19:56:57
anonymous from Australia  
The smallest help that still does the job.
2017-01-10, 14:29:53
anonymous from Indonesia  
JIKA ANDA BUTUH ANGKA TOGEL GAIB (_SGP,HKG,MLYS,SYD,THLND,TAIWAN_)
YANG DI JAMIN 100% TEMBUS SILAHKAN
Call/Sms Di No_o82_319_2o8_865_ AKI NUGROHO
Insya Allah Beliau Akan Siap Membantu Menyelesaikan Smua Masalah Anda,.
(_..KUNCI KESUKSESAN..._)
1. Pikiran Yang Positif,
2. Keyakinan Yang Bulat
3. Percaya Bahwa Kita Akan Berhasil
.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: