[Phpmyadmin-devel] Zoom-search and dates
ammaryasir.88 at gmail.com
Fri Aug 12 16:35:08 CEST 2011
On Fri, Aug 12, 2011 at 7:38 PM, Marc Delisle <marc at infomarc.info> wrote:
> Le 2011-08-11 16:17, Ammar Yasir a écrit :
> > Hi,
> > I pushed my work. What I tried was to convert each of the date into UNIX
> > timestamp, which generated milliseconds passed since 1970-01-01 00:00:00.
> > used the inbuit php function to str2time() for that and while testing I
> > found out that it does not supports dates before 1970 ( ideally it should
> > have given negative value). I then worked around to convert date into
> > timestamp data type from MySQL, so conversion to and from had to be done
> > manually. I had to use the library at  for parsing a string to
> > It now provides a meaningful distance measure between dates. I lost a bit
> > time working around this, will work on panning feature now.
> testing with commit 201331275bff7e3e67e3d5f3fb2bc706e302ad27, I have two
> 1. with my test table birthday, I see no dates at all in the plot
> I fixed it. The string format to match with date was wrong for time and
> 2. Warning in ./libraries/core.lib.php#704
> filemtime() [function.filemtime]: stat failed for ./js/canvg/rgbcolor.js
> I'm looking into it.
> > On Tue, Aug 2, 2011 at 10:55 PM, Ammar Yasir <ayax88 at gmail.com> wrote:
> >> On Tue, Aug 2, 2011 at 10:24 PM, Marc Delisle <marc at infomarc.info>
> >>> Ammar,
> >>> Zoom-search of date values needs improvement. Here is an example table:
> >>> CREATE TABLE IF NOT EXISTS `birthday` (
> >>> `id` int(11) NOT NULL AUTO_INCREMENT,
> >>> `name` varchar(50) NOT NULL,
> >>> `birthday` date NOT NULL,
> >>> PRIMARY KEY (`id`)
> >>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
> >>> INSERT INTO `birthday` (`id`, `name`, `birthday`) VALUES
> >>> (1, 'A', '1950-01-01'),
> >>> (2, 'B', '1950-02-02'),
> >>> (3, 'C', '1960-03-03'),
> >>> (4, 'D', '2000-04-04');
> >>> Generating a plot via zoom-search show that the same time elapsed
> >>> between two days (in 1950) than in ten or forty years.
> >>> If you could convert these dates to a number of days (probably at the
> >>> meaningful results. Of course you still need to display the unconverted
> >>> date value.
> >>> 
> >>> I looked up in the reference manual and I think Highcharts will do that
> >> automatically ( calculate distance between dates) if we can convert the
> >> into specific format, like the *dateFormat* function specified  will
> >> probably work.
> >> I'll need to have cases for each of the date and time types in MySQL 
> >> format to be chosen accordingly, like for datetime: '%e. %b %Y,
> >> and for year: ' %Y ' only)
> >>  http://www.highcharts.com/ref/#highcharts-object
> >>  http://dev.mysql.com/doc/refman/5.0/en/date-and-time-types.html
> >> --
> >>> Marc Delisle
> >>> http://infomarc.info
> Marc Delisle
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it.
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Developers