Thanks, That was just what I needed, ie:
SELECT DATE_FORMAT(DATE_SUB(insert_date, INTERVAL 2 HOUR), '%b %e (%r)')

Johan

> On 17-Oct-2001 Alfredeen Johan K wrote:
> > I store a timestamp in a database of when a record was 
> inserted. When I pull
> > it out, I format it like this SELECT 
> DATE_FORMAT(insert_date,'%b %e (%r)')
> > AS idate
> > 
> > Now I would like to subtract 2 hours from the hour part of 
> the timestamp.
> > What's the easiest way to do this, before or after the 
> formatting? In PHP or
> > mySQL function? Can someone give me some code of how they 
> would do this.
> > 
> 
> SELECT DATE_FORMAT(DATE_SUB(insert_date, INTERVAL 2 HOUR), 
> '%b %e (%r)')
> 
> Regards,
> -- 
> Don Read                                       [EMAIL PROTECTED]
> -- It is necessary for me to learn from others' mistakes. I 
>    will not live long enough to make them all by myself.
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to