Board index » delphi » function for date

function for date

Hi all,

Exmpl.: On MSSQL 7.0 I can write in ADODataSet:

CommandText := 'select GetDate() as DTNow';
Open
  // Now I can access the actual datetime:
  Time := ADODataSet.Fields.Fields[0].AsDateTime;
Close;

How to do the same on Interbase server 6.01? Does exist the similar
function, how to get the timestamp?

Thank you very much for your answer and your help.

PaJi.
---------

 

Re:function for date


Hi,

Im sorry, but how can I do:

select current_timestamp;
select current_timestamp();
select current_timestamp as xxxx;

The three lines don't functions.

Thank you very much.

PaJi.
--------------------

Re:function for date


Quote
PaJi wrote:

> Hi,

> Im sorry, but how can I do:

> select current_timestamp;
> select current_timestamp();
> select current_timestamp as xxxx;

> The three lines don't functions.

> Thank you very much.

> PaJi.
> --------------------

select current_timestamp from RDB$DATABASE

--
Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
(Please do not email    'Till I lost the peace that dreaming gives
 me directly unless     I dreamed of the moment of my own death
 asked.  Thank You)     That no one ever dreams and lives (Marillion)

Re:function for date


Hi,

Im sorry, but how can I do:

select current_timestamp;
select current_timestamp();
select current_timestamp as xxxx;

The three lines don't functions.

Thank you very much.

PaJi.
--------------------

Re:function for date


Hi Jeff,

thank you very much.

PaJi.
------------

Re:function for date


Quote
PaJi wrote:

> Hi all,

> Exmpl.: On MSSQL 7.0 I can write in ADODataSet:

> CommandText := 'select GetDate() as DTNow';
> Open
>   // Now I can access the actual datetime:
>   Time := ADODataSet.Fields.Fields[0].AsDateTime;
> Close;

> How to do the same on Interbase server 6.01? Does exist the similar
> function, how to get the timestamp?

IB 6.0 introduces three keywords

current_date, current_time, current_timestamp.

Pre IB 6.0 has NOW

Quote
> Thank you very much for your answer and your help.

> PaJi.
> ---------

--
Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
(Please do not email    'Till I lost the peace that dreaming gives
 me directly unless     I dreamed of the moment of my own death
 asked.  Thank You)     That no one ever dreams and lives (Marillion)

Re:function for date


Hi Jeff,

thank you very much again.

PaJi.
------------

Other Threads