May I recommend setting the field type to INT, and just using timestamps? That's what I usually do, then you can manipulate things however you want. Much more convenient than the date style type I think. Looking at how the MySQL docs talk about the DATETIME field, I bet the database is doing just that, but converting for you. If you use the PHP date/time functions instead to convert you have a lot more control.
-Micah At 09:38 PM 9/27/2002 +0100, Steve Vernon wrote: >Hiya, > I am doing a database of things that have dates, some I know the > month and year of, some I only know the year. I suppose I could do a > field for the year, and one for month, and then allow the month to be > NULL. But is there a date type that allows years and / or months??? > > Thanks, > > > Steve > >---------- > > > > _.-..-```---._..``\--.._ > ../\` ``-._ ``-._ > _/_ o \ _.-```.``. \`-._ _>=-. > _.-`\_\ \ o `. (_`.__./ / |--``-`._##.` > -` \ o `. `-----`` _` o \#// > / \ _.._ \ o _.`-........-`` _.-`\_.\-<`\ > | .| `-.___\-` o__.-._. `._..-`` `.\ > |/ \__...--`.-` \____.-`_.--`````. |) > | _|.-``\`` _...-``\ /`. `. `. // > \/.#####.`=._ /_ \ \ `....._/ \`// > \`#####`_.--`|_`--.\ __ `. \\_ `. `.`. > ``````` `--._|__````````\ `.`._.\-`\ \ > `````````\ \ \ `. ` \ > `. `.`. \ | \ > `. \ ``-~` \ > `. \ _..-` > `-``` >Stephen Vernon, recently graduated from the University of Sheffield, where >I studied Computer Science. I could do with a job! >Stephen Vernon >Mobile 07971 446 956 >Mobile 07971 446 956 >
