Subject Re: [firebird-support] Grabbing only date portion of Timestamp?
Author Joe Martinez
I just tried that, and it didn't work. The time portion still came over.

-Joe

At 02:14 PM 7/6/2004, you wrote:


>On 7/6/2004 at 1:47 PM Joe Martinez wrote:
>
> > I have two tables with fields of type Timestamp. Table1 has a
> > 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?
> >
>
>update table2 set MyDate = (select cast(SomeDate as Date) from Table1
>where Table1.KeyField = Table2.KeyField )
>
>HTH,
>
>Dan.
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>