How to Substract Milliseconds from A timestamp(3) Field

From: Lane Van Ingen <lvaningen(at)esncc(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to Substract Milliseconds from A timestamp(3) Field
Date: 2006-10-17 18:33:16
Message-ID: TWMAILg40IoWiwXVO3d0000001f@twmail.ESNCC.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

In PLPGSQL, does anyone know how to subtract MILLISECONDS from a field
defined as timestamp(3), yielding another field defined as timestamp(3)?

Have been trying interval, and conversion functions but no luck.

Example: '2006-10-17 14:23:28.951'; subtract 5 milliseconds from a field
called mytable.end_time, and return the results to a field named
work_timestamp.

work_timestamp := ????

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Brandon Aiken 2006-10-17 21:03:11 Re: How to Substract Milliseconds from A timestamp(3) Field
Previous Message me 2006-10-17 16:28:25 Re: bad planner pick... but why?