Hi,
I currently plan to have my dates in a mmhhddMMyyyy format for storage in a database for a news script im making as all the 200 i sorted thru dont comply to my simple need, of changing the silly links in the headlines so i can keep everything within my site without it leaving to a news scripting...
Anyway, i would like to get a date function out of these numbers. For example. I would like to enter my format into a date() function and then out put something like 15 May 2002...
Also, im wondering how, with these records in a db, to get posts of a certian month.
Would be it best if i reversed it to yyyyMMddhhmm and pick the posts that are between yyyyMM000000 and yyyyMM999999
however, the only way i can do the MM+1 is to have it in the date function... so i can add en extra month on.
Or would a much better idea be i order by date with earilest first, pulling the month out of that(for a news archive function) and then increasing the month by one, and checking if there are any posts in that month? as i dont want it to go through every single news post.... as thats processing power and time...
I would need to forum a loop function for all the months. Asigning the month a number like is it mktime (seconds since unix started) and then stopping when its reached the current month... i think this would be best...
So for that... i would need a date() + xx months function, for it to output the dates...
Thanks for any help!