Subject | Re: [firebird-support] Grabbing only date portion of Timestamp? |
---|---|
Author | Dan Wilson |
Post date | 2004-07-06T21:14:11Z |
On 7/6/2004 at 1:47 PM Joe Martinez wrote:
HTH,
Dan.
> I have two tables with fields of type Timestamp. Table1 has aupdate table2 set MyDate = (select cast(SomeDate as Date) from Table1 where Table1.KeyField = Table2.KeyField )
> date/time in
> there. Table 2 has the field blank. I want to do a SQL command that
> will
> take all the dates from the date field ofTable1 and copy them over to
> table2, but ONLY the date portion.
>
> So, something like:
>
> update table2 set MyDate = (select SomeDate from Table1 where
> Table1.KeyField = Table2.KeyField)
>
> Except that this pulls over both the time and date. I want the time
> portion to get chopped off when stored in Table2.
>
> How can I modify that query to make that happen?
>
HTH,
Dan.