You are here: Re: How to show weekly monthly data in a report. « PHP Programming Language « IT news, forums, messages
Re: How to show weekly monthly data in a report.

Posted by Erwin Moller on 05/15/07 16:12

azimid@gmail.com wrote:

> Hello everyone,
>
> I need your help with a query.
>
> Currently I display the data in a daily format. I have a form that the
> users submits the date range (from say 20061224 to 20070530) and the
> data is displayed daily.
>
> I like to know how I can show the data in weekly and monthly way.so
> that for the range shown above I would have the monthly or weekly
> only.
>
> Unfortunatly the date format in the db has the type text and is stored
> as yyyymmdd.
>
> i.e table.
>
> date, sales, product and I can show daily only.
>
> Please show an example where I can show this data in weekly and
> monthly format.
>
> Thank you all.

Hi,

To say the obvious: You now know why you should store dates in dateformat
and not as text. ;-)

Anyway: It should be reasonable easy to transform your text-field to a real
datefield.

What database are you using?

And: are you looking for a real solution (= change the databasestructure),
or do you just want a hack to use the textfield in a GROUP BY approach?

And: Do you know SQL good enough to write such queries yourself? (Using
GROUP BY)

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация