Subject Re: [ib-support] DateTime Field Manipulations
Author Martijn Tonies
Hi,

Use:

update table1 set logindate = cast(login as date), logintime = cast(login as
time)

Where 'logindate' is of type TIMESTAMP

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

> I have a table (Firebird) with two fields (login and logout) both
> currently defined as DateTime fields. For various reasons I now need
> to split each of these fields into 2 separate fields (one containing
> the date portion and the other the time). Under MySQL I could do a
> simple update query using functions to separate out the two elements
> of the existing field. How do I achieve this under Firebird?
>
> I am looking for something like:
>
> update table1 set logindate=date(login), loginTime=time(login) ...
>
> I don't really want to get ito writing UDFs as I don't have the time
> or the knowledge.
>
> Thanks