> > 2004-09-03 08:00 --> 2004-09-03 00:00
> > 2004-09-03 14:00 --> 2004-09-03 00:00
> > 2004-09-03 15:01 --> 2004-09-04 00:00

> SELECT CAST(your_datetime_field + INTERVAL '11 hours' AS
> DATE) FROM table

At first glance this looks good and the MySQL docs seem to support this
theory but it just throws an error.  When I run...

  SELECT   SELECT CAST(MessageDate + INTERVAL '11 hours' AS DATE)
  FROM     table

I get the error...

Syntax error or access violation: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right
syntax to use near 'SELECT CAST(MessageDate + INTERVAL '11 hours' AS DATE)
FROM table' at line 1

I have also tried using the DATE_ADD() syntax but with no better results.

--
Jay
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to