|
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]
|