Hai All,
This is my create statement
[code=mysql]
CREATE TABLE `dbname`.`table name` (
`vh_id` int(10) unsigned NOT NULL,
`gh_utc` time NOT NULL,
`gh_mydate` date default NULL,
`gh_serverdate_ time` timestamp NOT NULL default CURRENT_TIMESTA MP,
KEY `FK_geo_gpsdata _2` (`vh_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;[/code]
when i query this table im getting "Truncated incorrect time value: '1:05 AM"
the below is the query.Not getting why the time value is truncated.
[code=mysql]
SELECT time_format(gh_ utc ,'%H:%m:%s'),
date_format(gh_ mydate,'%d/%m/%Y')
FROM tablename where vh_id='1' and timestamp(gh_my date,gh_utc)
between timestamp('2009/01/01','1:05 AM') and timestamp('2009/01/16','1:05 PM') ;[/code]
Awaiting for the reply.
Thanks in advance
This is my create statement
[code=mysql]
CREATE TABLE `dbname`.`table name` (
`vh_id` int(10) unsigned NOT NULL,
`gh_utc` time NOT NULL,
`gh_mydate` date default NULL,
`gh_serverdate_ time` timestamp NOT NULL default CURRENT_TIMESTA MP,
KEY `FK_geo_gpsdata _2` (`vh_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;[/code]
when i query this table im getting "Truncated incorrect time value: '1:05 AM"
the below is the query.Not getting why the time value is truncated.
[code=mysql]
SELECT time_format(gh_ utc ,'%H:%m:%s'),
date_format(gh_ mydate,'%d/%m/%Y')
FROM tablename where vh_id='1' and timestamp(gh_my date,gh_utc)
between timestamp('2009/01/01','1:05 AM') and timestamp('2009/01/16','1:05 PM') ;[/code]
Awaiting for the reply.
Thanks in advance
Comment